LoginSignup
0
0

More than 1 year has passed since last update.

Cloud9からCloudFormationにデプロイするときに発生したエラー

Last updated at Posted at 2021-11-05

エラーコード

Error: Failed to create/update the stack: {スタック名}, Waiter
StackCreateComplete failed: Waiter encountered a terminal failure state: For
expression "Stacks[].StackStatus" we matched expected path: "ROLLBACK_COMPLETE" at least once

このエラーコードの上には、エラー発生原因がある。そこのエラーコードは

CREATE_FAILED              AWS::IAM::Role             ServerlessFunctionRole     Syntax errors in policy. 
                                                                                 (Service: AmazonIdentity 
                                                                                 Management; Status Code: 
                                                                                 400; Error Code:         
                                                                                 MalformedPolicyDocument; 
                                                                                 Request ID: {リクエストID} 
                                                                                 ; Proxy: null)          

Qiitaではスクロールする必要があるが、このレイアウトでエラーが出る。どうやらRoleの設定がうまくいっていないらしい。さらにその原因はtemplate.yamlがどこかおかしいことにある。
それではどこがおかしかったか。

エラー原因

template.yaml
Policies:
        Statement:
          Action:['s3:*']
          Effect:Allow
          Resource:'*'

エラーの原因はここである。何がおかしいのか?それは
:の後ろにスペースがないからである。色を見ればわかるが全てブルーになっている。正しくは

template.yaml
Policies:
        Statement:
          Action: ['s3:*']
          Effect: Allow
          Resource: '*'

こうである。

エラー解決方法

スペースを入れる。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0