0
0
AWScloud~20 mins

Stack drift detection in AWS - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Stack Drift Detection Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
What is the primary purpose of AWS CloudFormation stack drift detection?

Choose the best description of what stack drift detection does in AWS CloudFormation.

AIt identifies differences between the actual stack resources and the stack template's declared configuration.
BIt automatically fixes any configuration differences found in the stack resources.
CIt deletes resources that are not defined in the stack template.
DIt backs up the stack resources before any update operation.
Attempts:
2 left
💡 Hint

Think about what 'drift' means in terms of configuration and actual state.

service_behavior
intermediate
1:30remaining
What happens when you run drift detection on a stack with no changes outside CloudFormation?

You run drift detection on a CloudFormation stack that has not been modified outside of CloudFormation. What is the expected result?

AThe stack is marked as DRIFTED, indicating changes were found.
BThe stack update is automatically triggered to reapply the template.
CThe stack is marked as IN_SYNC, indicating no drift detected.
DThe stack is deleted and recreated to ensure consistency.
Attempts:
2 left
💡 Hint

Consider what it means if no changes were made outside CloudFormation.

Configuration
advanced
2:00remaining
Which AWS CLI command correctly initiates drift detection on a stack named 'MyAppStack'?

Select the correct AWS CLI command to start drift detection on the stack named 'MyAppStack'.

Aaws cloudformation initiate-drift-detection --stack-name MyAppStack
Baws cloudformation detect-stack-drift --stack-name MyAppStack
Caws cloudformation check-stack-drift --stack-name MyAppStack
Daws cloudformation start-drift-detection --stack-name MyAppStack
Attempts:
2 left
💡 Hint

Look for the exact AWS CLI command name for drift detection.

security
advanced
1:30remaining
What IAM permission is required to perform stack drift detection in AWS CloudFormation?

Identify the minimum IAM permission needed to run drift detection on a CloudFormation stack.

Acloudformation:CreateStack
Bcloudformation:UpdateStack
Ccloudformation:DeleteStack
Dcloudformation:DetectStackDrift
Attempts:
2 left
💡 Hint

Think about the permission that allows checking for drift, not modifying the stack.

Best Practice
expert
2:00remaining
Which approach best ensures early detection of stack drift in a production environment?

Choose the best practice to detect stack drift early and maintain infrastructure consistency.

ASchedule automated drift detection runs regularly using AWS CloudWatch Events or EventBridge.
BRun drift detection only manually after a stack update is performed.
CRely on CloudFormation stack update failures to detect drift.
DIgnore drift detection and rely on manual audits quarterly.
Attempts:
2 left
💡 Hint

Consider automation and frequency for early detection.