CloudFormationのエラーメッセージと対処

CloudFormationでのエラーメッセージと対象方法は、以下のとおりです。

= 備考 =

AWSが出力しているCloudFormationのエラーメッセージは、2023年11月1日現在の内容です。

スタックの作成画面

1  Parameter '***' must contain at least 1 characters

対処)

入力が必須の項目が入力されていません。「スタックの詳細を指定」画面のパラメーターから'***'(パラメーターキー)を確認して、パラメーターを入力してください。

2  Parameter 'ResourceIdentifier' must contain at most 19 characters

対処)

パラメーターキー「ResourceIdentifier」は19文字以内で入力してください。パラメーターキー「ResourceIdentifier」はCloudFormationで作成するリソースのリソース名に含まれるため、最大文字数は19文字となっています。

3  Parameter 'ResourceIdentifier' must match pattern ^[a-z0-9-]*$

対処)

パラメーターキー「ResourceIdentifier」はCloudFormationで作成するリソースのリソース名に含まれるため、利用できる文字種類に制限があります。入力できる文字は、半角英小文字、数字およびハイフン(-)です。

4  Parameter 'S3IAMPolicy' must match pattern ^$|^arn:aws:iam::.*

対処)

パラメーターキー「S3IAMPolicy」はARN(arn:aws:iam::xxx)形式で入力してください。パラメーターキー「S3IAMPolicy」は使用するIMAポリシーのARNを指定するか、使用しない場合は空白にしてください。

5  Parameter '***' must match pattern (\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/(\d{1,2})

対処)

CIDR(x.x.x.x/xx)形式の入力が必要なパラメーターキーにCIDR形式以外のパラメーターが入 力されています。「スタックの詳細を指定」画面のパラメーターから'***'(パラメーターキー)を確認して、CIDR形式でパラメーターを入力してください。

6  すべてのチェックボックスの内容を承認してから続行してください。

対処)

レビュー画面の「The following resource(s) require capabilities: [AWS::CloudFormation::Stack]」の記載内容を確認します。該当ボックス内のチェックボックスにチェック後、「送信」を実施してください。

7  Stack [***] already exists

対処)

同一リージョンに同じ名前のスタックがあります。別のスタック名に変更してください。

CloudFormation一覧画面

1  Embedded stack arn:aws:cloudformation:***-Network1※1*** was not successfully updated. Currently in UPDATE_ROLLBACK_IN_PROGRESS with reason: The following resource(s) failed to update: [SecurityGroup1※2].

対処)

CloudFormationスタック「root.yaml」から呼び出した「Network1※1」スタックにて「SecurityGroup1」を作成時にエラーが発生しました。CloudFormation画面から「ステータスのフィルター」を「削除済み」かつ「ネスト表示」を有効に指定して「指定したスタック名-Network1※1-***-SecurityGroup1※2-***」を開き、「状況の理由」欄から詳細を確認してください。

※1および※2が別の名称でも同様です。

2  Export with name***-*** is already exported by stack ***. Rollback requested by user.

対処)

「root.yaml」によってエクスポートされる値がすでに存在するためエクスポートできませんでした。

「ResourceIdentifier」が作成済みのスタックで指定したものと同じ場合は別の値に変更してください。

3  Resource handler returned message: "You are not authorized to perform this operation. User: arn:aws:sts::*** is not authorized to perform: ***:Create*** on resource: arn:aws:**** because no identity-based policy allows the *** action. Encoded authorization failure message: ***(Service: Ec2, Status Code: 403, Request ID: ***)" (RequestToken:***, HandlerErrorCode: AccessDenied)

対処)

スタックを作成したユーザーまたは指定したロールに権限が足りず、スタックでリソースを作成できませんでした。スタックを作成したユーザーまたは指定したロールの権限を確認してください。

4  Resource handler returned message: "Resource of type 'AWS::***::***' with identifier ***' already exists." (RequestToken: ***, HandlerErrorCode: AlreadyExists)

対処)

スタックによって作成予定のリソースと同じ名前のリソースがすでに作成されています。既存のリソースを削除するか、または「ResourceIdentifier」を変更して別のリソース名にしてください。

5  Template error: Template error: invalid count (11) of subnets requested. The maximumcount available is 8"

対処)

パラメーターキー「VpcCidr」で指定したアドレス空間が /24より小さいです。アドレス空間は最小 /24で確保する必要があります。

6  Resource handler returned message: "Policy arn:aws:iam::***:policy/*** does not existor is not attachable. (Service: Iam, Status Code: 404, Request ID: ***)" (RequestToken:***, HandlerErrorCode: NotFound)

対処)

パラメーターキー「S3IAMPolicy」に入力したARNのIAMポリシーが存在しません。存在するIMAポリシーのARNを入力してください。

7  CIDR block *** is malformed (Service: AmazonEC2; Status Code: 400; Error Code:InvalidParameterValue; Request ID: ***; Proxy: null)

対処)

パラメーターキー「SourceIP2」または「SourceIP3」で入力したIPアドレスがCIDR形式となっていません。CIDR形式で入力してください。

8  Resource handler returned message: "Invalid id: "***.***.***.***/**" (expecting "vpc-… ")(Service: Ec2, Status Code: 400, Request ID: ***)" (RequestToken: ***, HandlerErrorCode:GeneralServiceException)

対処)

パラメーターキー「PeeringVpcId」に入力している値がVPC IDとなっていません。VPC IDは、“vpc-”から始まる任意の文字列で指定してください。

9  Resource handler returned message: "The vpc ID '***' does not exist (Service: Ec2,Status Code: 400, Request ID: ***)" (RequestToken: *** HandlerErrorCode:GeneralServiceException)

対処)

パラメーターキー「PeeringVpcId」に入力しているVPC IDのVPCが存在しません。入力したVPC IDを確認してください。

10 Resource handler returned message: "The destination CIDR block ***.***.***.***/** isequal to or more specific than one of this VPC’s CIDR blocks. This route can target onlyan interface or an instance. (Service: Ec2, Status Code: 400, Request ID: ***)"(RequestToken: *** HandlerErrorCode: GeneralServiceException)

対処)

パラメーターキー「VpcCidr」で入力したVPC CIDRと、「PeeringVpcId」で入力したVPCPeering接続をする先のVPC CIDRが同じ、または範囲が重なっています。別のVPC CIDRを指定してください。

11 Resource handler returned message: "You must provide one of destinationCidrBlock ordestinationIpv6CidrBlock or destinationPrefixList and a valid routeTableId"(RequestToken: ***, HandlerErrorCode: InvalidRequest)

対処)

パラメーターキー「PeeringVpcCidr」に入力しているVPC CIDRと「PeeringVpcId」で入力 したVPCPeering接続をする先のVPC CIDRの値が一致しません。

12 Parameter validation failed: parameter value for parameter name HostZoneID does notexist. Rollback requested by user.

対処)

パラメーターキー「HostZoneID」に値が入力されていないか、または存在するリソースを選択できていません。入力した値を確認してください。

13 2 validation errors detected: Value '[*.***]' at 'subjectAlternativeNames' failed to satisfy constraint: Member must satisfy constraint: [Member must have length less than or equal to 253, Member must have length greater than or equal to 1, Member must satisfy regular expression pattern: ^(\*\.)?(((?!-)[A-Za-z0-9-]{0,62}[A-Za-z0-9])\.)+((?!-)[A-Za-z0-9-]{1,62}[A-Za-z0-9])$]; Value '***' at 'domainName' failed to satisfy constraint: Member must satisfy regular expression pattern: ^(\*\.)?(((?!-)[A-Za-z0-9-]{0,62}[A-Za-z0-9])\.)+((?!-)[A-Za-z0-9-]{1,62}[A-Za-z0-9])$ (Service: AWSCertificateManager; Status Code: 400; Error Code: ValidationException; Request ID: ***; Proxy: null)

対処)

パラメーターキー「DomainName 」に正しい値が入力されていません。エラーメッセージの内容に指定されている形式で、ドメイン名を入力してください。

14 [RRSet with DNS name _*.*** is not permitted in zone ***.***.] (Service:AmazonRoute53; Status Code: 400; Error Code: InvalidChangeBatch; Request ID: ***;Proxy: null)

対処)

パラメーターキー「DomainName」で入力したドメインを使用している「HostZoneID」が誤っています。「DomainName」と「HostZoneID」の組み合わせが正しいか確認してください。

15 Resource handler returned message: "RDS does not support creating a DB instance withthe following combination: DBInstanceClass=db.***, Engine=aurora-mysql,EngineVersion=8.0.mysql_aurora.3.03.1, LicenseModel=general-public-license. Forsupported combinations of instance class and database engine version, see thedocumentation. (Service: Rds, Status Code: 400, Request ID: ***)" (RequestToken: ***,HandlerErrorCode: InvalidRequest)

対処)

パラメーターキー「DBInstanceType」で入力したインスタンスタイプはスタックを実行したリージョンでは使用できません。別のインスタンスタイプを指定してください。

16 Resource handler returned message: "Maximum capacity cannot be less than minimumcapacity (Service: ApplicationAutoScaling, Status Code: 400, Request ID: ***)"(RequestToken: ***, HandlerErrorCode: InvalidRequest)

対処)

パラメーターキー「ECSMaximumNumberOfTasks」に入力した値が「ECSMinimumNumberOfTasks」に指定した値より小さいです。「ECSMaximumNumberOfTasks」の値は「ECSMinimumNumberOfTasks」より大きくしてください。