AWS AWSCloudFormation documentation change
Summary
Added troubleshooting section for VPC-related stack creation failures and updated VPC prerequisite guidance
Security assessment
The changes provide troubleshooting steps for VPC configuration issues but do not address a specific security vulnerability or weakness. The guidance helps users resolve deployment errors rather than mitigate security risks.
Diff
diff --git a/AWSCloudFormation/latest/UserGuide/gettingstarted.walkthrough.md b/AWSCloudFormation/latest/UserGuide/gettingstarted.walkthrough.md index 66a73d40e..516c401c4 100644 --- a//AWSCloudFormation/latest/UserGuide/gettingstarted.walkthrough.md +++ b//AWSCloudFormation/latest/UserGuide/gettingstarted.walkthrough.md @@ -5 +5 @@ -PrerequisitesCreate a CloudFormation stack with the consoleMonitor stack creationTest the web serverClean upNext steps +PrerequisitesCreate a CloudFormation stack with the consoleMonitor stack creationTest the web serverTroubleshootingClean upNext steps @@ -26,0 +27,2 @@ CloudFormation is free, but you'll be charged for the Amazon EC2 and Amazon S3 r + * Troubleshooting + @@ -38 +40 @@ CloudFormation is free, but you'll be charged for the Amazon EC2 and Amazon S3 r - * You must have a Virtual Private Cloud (VPC) that has access to the internet. To keep things simple, you can use the default VPC that comes automatically with your account. The default VPC and default subnets are sufficient for this exercise. + * You must have a Virtual Private Cloud (VPC) that has access to the internet. This walkthrough template requires a default VPC, which comes automatically with newer AWS accounts. If you don't have a default VPC, or if it was deleted, see the troubleshooting section in this topic for alternative solutions. @@ -227,0 +230,41 @@ This confirms that your EC2 instance is running Apache HTTP Server and serving a +## Troubleshooting + +If you experience a rollback during stack creation, it might be due to a missing VPC. Here's how to resolve this issue. + +### No default VPC available + +The template in this walkthrough requires a default VPC. If your stack creation fails because of VPC or subnet availability errors, you might not have a default VPC in your account. You have the following options: + + * Create a new default VPC – You can create a new default VPC through the Amazon VPC console. For instructions, see [Create a default VPC](https://docs.aws.amazon.com/vpc/latest/userguide/work-with-default-vpc.html#create-default-vpc) in the _Amazon VPC User Guide_. + + * Modify the template to specify a subnet – If you have a non-default VPC, you can modify the template to explicitly specify the VPC and subnet IDs. Add the following parameter to the template: + + SubnetId: + Description: The subnet ID to launch the instance into + Type: AWS::EC2::Subnet::Id + + +Then, update the `WebServer` resource to include the subnet ID: + + WebServer: + Type: AWS::EC2::Instance + Properties: + ImageId: !Ref LatestAmiId + InstanceType: !Ref InstanceType + SecurityGroupIds: + - !Ref WebServerSecurityGroup + SubnetId: !Ref SubnetId + UserData: !Base64 | + #!/bin/bash + yum update -y + yum install -y httpd + systemctl start httpd + systemctl enable httpd + echo "<html><body><h1>Hello World!</h1></body></html>" > /var/www/html/index.html + + +When creating the stack, you'll need to specify a subnet that has internet access for the web server to be reachable. + + + +