0
0
AWScloud~20 mins

Nested stacks for modularity in AWS - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Nested Stack Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Architecture
intermediate
2:00remaining
Understanding Nested Stack References

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?

AWS
Resources:
  VPCStack:
    Type: AWS::CloudFormation::Stack
    Properties:
      TemplateURL: https://s3.amazonaws.com/examplebucket/vpc-template.yaml
      Parameters:
        VpcCIDR: 10.0.0.0/16
A
61/0.0.0.01 :RDICcpV    
:sretemaraP  
lmay.etalpmet-cpv/tekcubelpmaxe/moc.swanozama.3s//:sptth :LRUetalpmeT  
:seitreporP
kcatS::noitamroFduolC::SWA :epyT
B
Type: AWS::EC2::VPC
Properties:
  CidrBlock: 10.0.0.0/16
C
Type: AWS::CloudFormation::Stack
Properties:
  TemplateBody: |
    Resources:
      VPC:
        Type: AWS::EC2::VPC
        Properties:
          CidrBlock: 10.0.0.0/16
D
Type: AWS::CloudFormation::Stack
Properties:
  TemplateURL: https://s3.amazonaws.com/examplebucket/vpc-template.yaml
  Parameters:
    VpcCIDR: 10.0.0.0/16
Attempts:
2 left
💡 Hint

Look for the correct way to specify the nested stack's template location and parameters.

service_behavior
intermediate
1:30remaining
Behavior of Parameter Passing in Nested Stacks

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?

AThe nested stack deployment fails with a missing parameter error.
BThe nested stack uses a default value for the missing parameter automatically.
CThe parent stack ignores the missing parameter and continues deployment.
DThe nested stack creates the parameter with a null value.
Attempts:
2 left
💡 Hint

Think about required parameters and deployment validation.

security
advanced
2:00remaining
Security Best Practices for Nested Stack Templates

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?

AMake the S3 bucket public and restrict access using bucket policies.
BUse S3 bucket policies to allow access only from CloudFormation service principal and encrypt templates with SSE-S3.
CStore templates in a private bucket without any policies and rely on IAM roles for access.
DUse pre-signed URLs with long expiration times for template URLs.
Attempts:
2 left
💡 Hint

Consider least privilege and encryption.

Configuration
advanced
1:30remaining
Troubleshooting Nested Stack Rollback Behavior

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?

ACloudFormation rolls back the entire parent stack and all nested stacks created so far.
BCloudFormation deletes only the failed nested stack and keeps the rest.
CCloudFormation continues creating other nested stacks and leaves the failed one in rollback state.
DCloudFormation pauses deployment and waits for manual intervention.
Attempts:
2 left
💡 Hint

Think about atomic deployment and rollback.

🧠 Conceptual
expert
2:00remaining
Advantages of Using Nested Stacks for Large Infrastructure

Which of the following is NOT a primary advantage of using nested stacks in AWS CloudFormation for modular infrastructure design?

AImproved template readability and maintainability by breaking large templates into smaller ones.
BReuse of common infrastructure components across multiple stacks.
CAutomatic scaling of resources within nested stacks without manual intervention.
DSimplified updates by isolating changes to specific nested stacks.
Attempts:
2 left
💡 Hint

Consider what nested stacks manage versus what AWS services handle automatically.