You have a main AWS CloudFormation stack that includes a nested stack for a VPC configuration. Which of the following correctly references the nested stack resource in the main template?
Resources:
VPCStack:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: https://s3.amazonaws.com/examplebucket/vpc-template.yaml
Parameters:
VpcCIDR: 10.0.0.0/16Look for the correct way to specify the nested stack's template location and parameters.
Option D correctly uses Type: AWS::CloudFormation::Stack with a valid TemplateURL and parameters. Option D is a direct resource, not a nested stack. Option D uses TemplateBody which is valid but not referencing an external nested stack. Option D uses an invalid TemplateURL format.
When you pass parameters from a parent stack to a nested stack, what happens if the nested stack template expects a parameter that the parent stack does not provide?
Think about required parameters and deployment validation.
If a nested stack expects a parameter and it is not provided by the parent stack, the deployment fails because the nested stack cannot resolve the required input.
You want to secure your nested stack templates stored in Amazon S3. Which approach best protects the templates from unauthorized access while allowing CloudFormation to deploy them?
Consider least privilege and encryption.
Option B ensures the templates are encrypted and only accessible by CloudFormation via bucket policies, following security best practices. Public buckets or long-lived pre-signed URLs increase risk.
You deploy a parent stack with nested stacks. One nested stack fails during creation. What is the default behavior of CloudFormation regarding the parent and other nested stacks?
Think about atomic deployment and rollback.
CloudFormation treats the parent stack and nested stacks as a single unit. If any nested stack fails, the entire deployment rolls back to maintain consistency.
Which of the following is NOT a primary advantage of using nested stacks in AWS CloudFormation for modular infrastructure design?
Consider what nested stacks manage versus what AWS services handle automatically.
Nested stacks help organize and reuse templates but do not provide automatic scaling of resources; scaling is managed by specific AWS services like Auto Scaling groups.