AWS SysOps Admin SOA-C02 · Deployment, Provisioning, and Automation · hard

A SysOps administrator deploys an AWS CloudFormation stack containing an EC2 instance with a CreationPolicy (ResourceSignal: Count: 1, Timeout: PT10M). The EC2 instance's UserData script installs Nginx and runs /opt/aws/bin/cfn-signal -e $? --stack ${AWS::StackName} --resource WebServerInstance --region ${AWS::Region}. However, the instance is launched inside a private subnet with no NAT Gateway and no VPC Endpoints, and the stack rolls back after 10 minutes with Failed to receive 1 resource signal(s) within the specified duration. Why did cfn-signal fail, and how can it be fixed without adding public internet access?

Published · Last updated · checked before publication — how we verify questions

Options

  • AAttach an S3 Gateway VPC Endpoint (pl-xxxx) to the private subnet route table for cfn-signal
  • BIncrease the EC2 root EBS volume from 8 GiB to 100 GiB in BlockDeviceMappings
  • CReplace cfn-signal with cfn-hup daemon polling over UDP 53
  • DCreate an Interface VPC Endpoint for CloudFormation (com.amazonaws.<region>.cloudformation)Correct answer

Answer: D. Create an Interface VPC Endpoint for CloudFormation (com.amazonaws.<region>.cloudformation)

cfn-signal makes an HTTPS API call to the regional AWS CloudFormation service endpoint (cloudformation.<region>.amazonaws.com). In a private subnet with no NAT Gateway, that outbound HTTPS request times out unless you create an Interface VPC Endpoint (AWS PrivateLink) for AWS CloudFormation (com.amazonaws.<region>.cloudformation) with Private DNS enabled and a Security Group allowing inbound TCP 443 from the VPC CIDR.

Why the other options are wrong

  • A. Attach an S3 Gateway VPC Endpoint (pl-xxxx) to the private subnet route table for cfn-signal — cfn-signal calls the CloudFormation API (com.amazonaws.<region>.cloudformation), not Amazon S3.
  • B. Increase the EC2 root EBS volume from 8 GiB to 100 GiB in BlockDeviceMappings — Disk capacity does not provide network connectivity to the regional CloudFormation API endpoint.
  • C. Replace cfn-signal with cfn-hup daemon polling over UDP 53 — cfn-hup also requires HTTPS connectivity to CloudFormation and does not satisfy initial CreationPolicy signals over DNS.

All Deployment, Provisioning, and Automation questions and the topic overview →

AWS and Amazon Web Services are trademarks of Amazon.com, Inc. PrepIQ Hub is not affiliated with, endorsed by, or sponsored by Amazon Web Services.