SOA-C03 - Deployment, Provisioning, and Automation - Section 3.3

Identify and remediate CloudFormation drift, stack failures and deployment issues such as subnet sizing and permissions errors.

Detect and remediate CloudFormation drift when resources have been changed outside the stack, interpret stack rollback events, and resolve common deployment failures such as insufficient subnet CIDR space and missing IAM permissions. Apply stack policies to protect critical resources from accidental replacement during updates.

CloudFormation drift detectionStack rollbackSubnet sizingStack policies

Practice question for this objective

Free sampleDeployment, Provisioning, and Automationhard

A CloudFormation stack is deployed through a dedicated deployment role and fails repeatedly during creation, rolling back each time. The stack events show two distinct blocking errors before rollback: the deployment principal is not authorised to perform iam:PassRole when attaching a new execution role to a Lambda function, and the Auto Scaling group cannot launch because the target /28 subnet defined in the template has insufficient free addresses for the desired fleet size. The team must let the same workload deploy successfully while changing as little as possible. Which two actions together resolve the stack creation failure? (Select TWO.)

  • AAdd an iam:PassRole permission for the Lambda execution role's ARN to the deployment role's policy so it may hand that role to the Lambda service. Correct
  • BWiden the subnet to a larger CIDR such as /24 in the template so the subnet has enough usable host addresses for the Auto Scaling group to launch. Correct
  • CAttach the AdministratorAccess managed policy to each EC2 instance profile so the instances can create the remaining stack resources during boot.
  • DSet the stack's OnFailure option to DO_NOTHING so the failed resources are preserved for inspection instead of rolling back.
  • ERun drift detection on the stack and import the drifted resources so the template matches the live configuration before retrying.
Diagnose a failed CloudFormation creation by reading stack events and apply the specific fixes for an iam:PassRole denial and an undersized subnet CIDR. A failed CloudFormation creation must be diagnosed from its stack events, which here name two independent causes. The deployment role lacks iam:PassRole for the Lambda execution role, so scoping that permission to the role's ARN on the deploying principal clears the authorisation block. The /28 subnet provides only eleven usable hosts after AWS reserves five addresses, so enlarging its CIDR provides room for the fleet. Each fix targets a separate error and both are required. Instance admin rights, OnFailure settings and drift import do not change either the deploy role's permissions or the subnet's address space.

Why A is correct: The PassRole denial blocks role attachment, and granting iam:PassRole scoped to the execution role on the deployment principal removes that specific authorisation failure.

Why B is correct: The /28 yields only eleven usable addresses after reservations, so enlarging the subnet CIDR removes the insufficient free addresses error and lets the fleet launch.

Why C is wrong: It is tempting because broad permissions seem to fix authorisation errors, but instance profiles do not perform stack provisioning and this addresses neither the PassRole nor the address-space failure.

Why D is wrong: Preserving failed resources only aids debugging and is tempting after repeated rollbacks, but it leaves both the permissions and subnet sizing faults unfixed so creation still fails.

Why E is wrong: Drift detection sounds relevant to CloudFormation troubleshooting, but it compares an existing stack to its template and cannot run on a stack that never finished creating, so it fixes neither error.

See more SOA-C03 practice questions, answers explained.

More in this domain

Back to all Deployment, Provisioning, and Automation objectives, or the SOA-C03 cert hub.

Examworthy is not affiliated with or endorsed by Amazon Web Services. Original, blueprint-aligned practice material only.