Curated

Deployment, Provisioning, and Automation (3.1–3.2)

0 votes

Questions66

  1. Question 51

    Deployment, Provisioning, and Automation

    Which deployment strategy switches traffic from the existing environment to a separate environment running the new application version?

    Show the answer

    Correct answerB. Blue/green deployment

    AWhy not this: In-place deployment updates the application on existing compute resources.

    BWhy this is right: Blue/green deployment directs traffic from the existing environment to a separate environment containing the new version.

    CWhy not this: All-at-once in-place deployment updates the existing fleet together rather than switching to a separate environment.

    DWhy not this: Rolling deployment updates portions of a fleet incrementally rather than switching between separate complete environments.

    Blue/green deployment uses separate environments and switches traffic to the new version. Rolling deployment replaces or updates portions of the serving fleet incrementally rather than switching between two complete environments.

    Open this question
  2. Question 52

    Deployment, Provisioning, and Automation

    Which deployment strategy updates an application's existing instances in successive batches?

    Show the answer

    Correct answerA. Rolling deployment

    AWhy this is right: Rolling deployment updates successive batches of existing instances.

    BWhy not this: Immutable deployment creates replacement instances instead of updating the existing instances.

    CWhy not this: All-at-once deployment updates the entire target fleet together rather than in successive batches.

    DWhy not this: Blue/green deployment shifts traffic between separate environments rather than updating existing instances in batches.

    A rolling deployment updates existing instances in successive batches. An immutable deployment launches replacement instances rather than updating the existing instances.

    Open this question
  3. Question 53

    Deployment, Provisioning, and Automation

    A team uses AWS CodeDeploy to deploy an application revision to EC2 instances. Where should the team define file destinations and scripts that run during deployment lifecycle events?

    Show the answer

    Correct answerB. In an AppSpec file

    AWhy not this: A CloudFormation template declares infrastructure resources rather than application file mappings and deployment hooks.

    BWhy this is right: An AppSpec file specifies where application files go and which scripts run at deployment lifecycle events.

    CWhy not this: A buildspec file controls CodeBuild build phases rather than CodeDeploy deployment lifecycle events.

    DWhy not this: An image recipe defines components and settings for building images, not CodeDeploy lifecycle behavior.

    An AppSpec file defines file mappings and lifecycle event hooks for CodeDeploy deployments to EC2 instances. A buildspec file defines CodeBuild build commands, not CodeDeploy deployment instructions.

    Open this question
  4. Question 54

    Deployment, Provisioning, and Automation

    A CodeDeploy deployment must validate a new Lambda version before production traffic reaches it, then send it 10% of traffic for five minutes before shifting the remainder. Which configurations provide this behavior and automatic rollback when a monitored error alarm enters ALARM? (Choose three.)

    Choose 3 answers

    Show the answer

    Correct answersA. Use the CodeDeployDefault.LambdaCanary10Percent5Minutes deployment configuration.B. Configure a CloudWatch alarm and enable rollback when alarm thresholds are met.D. Configure a BeforeAllowTraffic hook to validate the new Lambda version.

    AWhy this is right: This configuration shifts 10% of traffic first, waits five minutes, and then shifts the remaining traffic.

    BWhy this is right: A monitored CloudWatch alarm can stop the deployment and trigger the configured automatic rollback.

    CWhy not this: This configuration shifts another 10% each minute rather than shifting the remainder after five minutes.

    DWhy this is right: BeforeAllowTraffic runs validation before production traffic is shifted to the new version.

    EWhy not this: AfterAllowTraffic runs after traffic shifting and cannot satisfy validation before production traffic reaches the version.

    The canary configuration provides the required traffic split, BeforeAllowTraffic validates before traffic shifts, and alarm-triggered rollback restores the previous version. Linear deployment shifts traffic repeatedly rather than holding at 10% before shifting the remainder.

    Open this question
  5. Question 55

    Deployment, Provisioning, and Automation

    An Elastic Beanstalk deployment must keep every original instance unchanged until a complete replacement fleet passes health checks. If deployment fails, the replacement fleet must be discarded without redeploying the previous version to original instances; which deployment policy meets these requirements?

    Show the answer

    Correct answerB. Immutable

    AWhy not this: An additional batch preserves serving capacity, but the deployment subsequently updates original instances.

    BWhy this is right: A separate replacement fleet is health-checked, and failed replacement instances can be terminated while originals remain unchanged.

    CWhy not this: All at once deploys to original instances together and does not create an isolated replacement fleet.

    DWhy not this: Rolling deployment updates original instances, so failure can leave instances running different application versions.

    An immutable deployment launches a complete replacement fleet in a temporary Auto Scaling group and verifies its health before replacing the original instances. Rolling with additional batch preserves capacity but still updates original instances in batches.

    Open this question
  6. Question 56

    Deployment, Provisioning, and Automation

    A CodePipeline pipeline deploys an application to a test environment and runs automated tests. Production deployment must wait for a release manager's explicit approval; what should the administrator add?

    Show the answer

    Correct answerC. A manual approval action before production deployment

    AWhy not this: A change set previews infrastructure changes but does not by itself require approval before production deployment.

    BWhy not this: A source action detects or retrieves revisions; it does not require a release manager to approve deployment.

    CWhy this is right: A manual approval action prevents the pipeline from proceeding until an authorized reviewer approves.

    DWhy not this: A timeout limits how long an action can run rather than introducing an approval gate.

    A manual approval action pauses pipeline execution until an authorized person approves it. A CloudFormation change set previews infrastructure changes but does not itself enforce human approval between pipeline stages.

    Open this question
  7. Question 57

    Deployment, Provisioning, and Automation

    A Lambda deployment must pass automated validation before receiving production traffic, then receive 10% of traffic for five minutes before full promotion. An elevated-error CloudWatch alarm must automatically restore the previous version; which CodeDeploy configuration meets these requirements?

    Show the answer

    Correct answerB. A pre-traffic hook, canary traffic shifting, and alarm-triggered automatic rollback

    AWhy not this: A post-traffic hook runs after traffic shifting, too late to provide the required validation gate.

    BWhy this is right: Pre-traffic validation, the specified canary interval, and alarm-triggered rollback satisfy all deployment requirements.

    CWhy not this: Linear shifting moves traffic in repeated increments rather than one 10% trial followed by full promotion.

    DWhy not this: Alarm monitoring alone does not configure automatic restoration of the previous version.

    A pre-traffic hook validates the version before production traffic, and a 10%-for-five-minutes canary configuration provides the required promotion pattern. Alarm-triggered automatic rollback restores the previous version; linear shifting instead increases traffic in repeated increments.

    Open this question
  8. Question 58

    Deployment, Provisioning, and Automation

    Which tool maintains version history and supports branching and merging for infrastructure configuration files?

    Show the answer

    Correct answerD. Git

    AWhy not this: Terraform provisions and manages infrastructure; it relies on a separate version control system for configuration history.

    BWhy not this: The AWS CDK defines infrastructure using programming languages but does not provide repository version control.

    CWhy not this: CloudFormation provisions resources from templates rather than providing file branching and merging.

    DWhy this is right: Git tracks file revisions and supports separate branches that can be merged.

    Git provides version control, including history, branches, and merges. Terraform provisions infrastructure from configuration files but does not itself provide repository version control.

    Open this question
  9. Question 59

    Deployment, Provisioning, and Automation

    A team requires approval of the exact Terraform changes that its pipeline will execute. Which approach lets reviewers inspect the proposed actions and ensures the deployment uses the approved plan?

    Show the answer

    Correct answerD. Save a plan file, review it, then apply that file

    AWhy not this: A newly generated plan can differ from the actions reviewers expected when they inspected the configuration.

    BWhy not this: State records managed resources but does not show the proposed changes needed to reach the desired configuration.

    CWhy not this: A refresh-only plan updates state and outputs to reflect remote changes; it does not deploy configuration changes.

    DWhy this is right: Applying the reviewed saved plan binds deployment to its proposed actions; Terraform rejects it if the state has become stale.

    A saved Terraform plan can be inspected and then supplied to apply, preserving the reviewed set of actions. Reviewing configuration and generating a new plan at deployment time does not bind execution to the previously reviewed actions.

    Open this question
  10. Question 60

    Deployment, Provisioning, and Automation

    A team renames a Terraform resource block without changing its arguments, and the plan proposes destroying and recreating the existing AWS resource. The migration must be recorded in version control and applied consistently across workspaces; what should the team do?

    Show the answer

    Correct answerC. Add a moved block mapping the old address to the new address

    AWhy not this: The resource is already managed; importing at its existing address does not record its move to the new address.

    BWhy not this: Removing the binding makes Terraform stop tracking the existing resource and can lead to attempted creation at the new address.

    CWhy this is right: A moved block declaratively maps the old resource address to the new one without recreating the AWS resource.

    DWhy not this: Preventing destruction can stop a destructive plan but does not associate the renamed block with the existing resource.

    A moved block records a resource-address change so Terraform preserves the existing resource during refactoring, and it can be committed for use across workspaces. Preventing destruction blocks the proposed operation but does not establish the mapping between the old and new addresses.

    Open this question
  11. Question 61

    Deployment, Provisioning, and Automation

    An Elastic Beanstalk application must maintain its existing serving capacity during updates and deploy the new version to a separate group of instances before replacing the original instances. Which deployment policy meets these requirements?

    Show the answer

    Correct answerD. Immutable

    AWhy not this: Rolling deployments update batches of existing instances, which reduces capacity while each batch updates.

    BWhy not this: All-at-once deployments update the existing instances together, interrupting service during deployment.

    CWhy not this: Rolling with additional batch keeps capacity with one extra batch but deploys onto the existing instances in batches.

    DWhy this is right: Immutable deployments validate a separate group of new instances while the original instances retain serving capacity.

    Immutable deployments launch a separate Auto Scaling group with the new version and verify the new instances before replacing the originals. Rolling with additional batch keeps full capacity by launching one extra batch, but it then updates the existing instances in batches rather than using a separate group.

    Open this question
  12. Question 62

    Deployment, Provisioning, and Automation

    An existing S3 bucket is absent from Terraform state, but its matching resource configuration has been added. A plan proposes creating the bucket, which must remain unchanged; how should the operator bring it under Terraform management?

    Show the answer

    Correct answerA. Import the bucket into its configured resource address.

    AWhy this is right: Import binds the existing bucket to the configured resource address without creating a replacement.

    BWhy not this: Targeting limits the operation's scope but does not associate the existing bucket with Terraform state.

    CWhy not this: State removal stops tracking a resource and cannot adopt a bucket that is already absent from state.

    DWhy not this: Refresh-only operations reconcile tracked objects; they do not import an untracked bucket.

    Import associates an existing AWS resource with a Terraform resource address without recreating it. A refresh-only apply updates objects already tracked in state; it does not discover and adopt an unmanaged bucket.

    Open this question
  13. Question 63

    Deployment, Provisioning, and Automation

    A faulty infrastructure configuration commit has been merged into a shared Git branch. The team must undo that commit's changes while preserving published history; what should the operator do?

    Show the answer

    Correct answerD. Revert the faulty commit.

    AWhy not this: Rebase rewrites commit history instead of recording a new reversal commit.

    BWhy not this: Cherry-pick reapplies a commit's changes rather than reversing them.

    CWhy not this: Reset moves the branch reference backward rather than preserving its published history.

    DWhy this is right: Revert records an inverse change as a new commit without removing published commits.

    Git revert creates a new commit that reverses the selected commit's changes while preserving history. Resetting the shared branch to an earlier commit moves its reference backward and would require rewriting published history.

    Open this question
  14. Question 64

    Deployment, Provisioning, and Automation

    Which activities does Git directly support when a team manages infrastructure configuration files? (Choose two.)

    Choose 2 answers

    Show the answer

    Correct answersA. Record version history for configuration files.C. Merge configuration changes from separate branches.

    AWhy this is right: Git commits preserve version history so configuration changes can be reviewed and traced.

    BWhy not this: Building AMIs requires an image-building tool or service, not Git's version-control functionality.

    CWhy this is right: Git merges integrate configuration changes developed on separate branches.

    DWhy not this: Terraform or another provisioning tool creates AWS resources; Git stores and versions the configuration.

    Git records file history and merges changes between branches. Provisioning AWS resources requires a deployment tool such as Terraform; Git itself does not perform that work.

    Open this question
  15. Question 65

    Deployment, Provisioning, and Automation

    A team uses Terraform to manage AWS resources. An operator must review proposed resource changes before making any changes to AWS. What should the operator do?

    Show the answer

    Correct answerA. Generate a Terraform execution plan.

    AWhy this is right: An execution plan previews the changes Terraform proposes without modifying AWS resources.

    BWhy not this: A CloudFormation change set previews changes to a CloudFormation stack, not Terraform-managed resources.

    CWhy not this: Validation checks configuration syntax and internal consistency but does not preview resource changes.

    DWhy not this: A refresh-only apply updates Terraform state to reflect remote objects rather than previewing configuration changes.

    A Terraform execution plan shows proposed resource changes without applying them. Validation checks configuration syntax and internal consistency, not the changes needed in AWS.

    Open this question
  16. Question 66

    Deployment, Provisioning, and Automation

    Two deployment workers use the same remote Terraform state, and their apply operations can overlap. What should the operator enable to prevent simultaneous state modifications?

    Show the answer

    Correct answerC. State locking in a supported backend.

    AWhy not this: Bucket versioning retains older object versions but does not provide mutual exclusion for Terraform operations.

    BWhy not this: Provider constraints control provider version selection, not concurrent access to state.

    CWhy this is right: A supported backend's state lock prevents simultaneous operations from modifying the same state.

    DWhy not this: Termination protection prevents CloudFormation stack deletion, not concurrent Terraform operations.

    State locking prevents concurrent Terraform operations from modifying the same state. Bucket versioning preserves previous state versions for recovery but does not prevent concurrent writes.

    Open this question