Curated

SDLC Automation (1.1–1.4)

0 votes

Questions65

  1. Question 51

    SDLC Automation

    Which AWS service automates building, testing, and distributing customized AMIs?

    Show the answer

    Correct answerB. EC2 Image Builder

    AWhy not this: CodeDeploy deploys application revisions to supported compute platforms rather than building AMIs.

    BWhy this is right: Image pipelines automate creation, testing, and distribution of customized machine images.

    CWhy not this: CodePipeline orchestrates release stages but relies on other services to create machine images.

    DWhy not this: Amazon ECR stores and distributes container images rather than creating customized AMIs.

    EC2 Image Builder provides image pipelines that build, test, and distribute customized AMIs. CodeDeploy deploys application revisions but does not build AMIs.

    Open this question
  2. Question 52

    SDLC Automation

    A team packages a Linux application revision for a CodeDeploy EC2/On-Premises deployment. Which capabilities can its AppSpec file define? (Choose three.)

    Choose 3 answers

    Show the answer

    Correct answersB. Set permissions on deployed files and directories.C. Associate scripts with deployment lifecycle events.D. Map revision files to destination directories.

    AWhy not this: Task definition references are used by ECS deployments, not EC2/On-Premises AppSpec files.

    BWhy this is right: The permissions section configures ownership and permissions for Linux deployment files and directories.

    CWhy this is right: The hooks section associates scripts with supported deployment lifecycle events.

    DWhy this is right: The files section maps files in the application revision to installation destinations.

    EWhy not this: Image Builder recipes are separate image-building resources, not AppSpec configuration.

    FWhy not this: Lambda traffic shifting is not a capability of an EC2/On-Premises AppSpec file.

    An EC2/On-Premises AppSpec file can define file mappings, lifecycle hooks, and Linux file permissions. ECS task definitions belong to the ECS deployment platform, not EC2/On-Premises deployments.

    Open this question
  3. Question 53

    SDLC Automation

    An Elastic Beanstalk application must launch a complete replacement fleet and pass health checks before any replacement instance serves production traffic. The team requires an update within the existing environment, no gradual traffic splitting, and preservation of the original fleet if replacement startup fails; which deployment policy BEST fits?

    Show the answer

    Correct answerB. Immutable

    AWhy not this: All-at-once deployment updates the existing fleet and does not preserve it as a separate fallback during startup.

    BWhy this is right: Immutable deployment validates a full replacement fleet before admission and leaves the original fleet intact if startup fails.

    CWhy not this: An additional batch maintains capacity, but rolling deployment does not validate a complete replacement fleet before serving traffic.

    DWhy not this: Traffic splitting deliberately sends a percentage of production traffic to the new fleet for evaluation.

    Immutable updates launch a complete new fleet in a temporary Auto Scaling group and verify its health before adding it to the environment's load balancer. Rolling with additional batch maintains capacity but updates in batches rather than validating an entire replacement fleet first.

    Open this question
  4. Question 54

    SDLC Automation

    An Amazon ECS rolling deployment replaces new tasks after load balancer health checks fail, although application logs show normal startup takes 90 seconds. Container health checks pass, but the service health check grace period is zero; which change BEST addresses the failure?

    Show the answer

    Correct answerA. Set the service health check grace period to 120 seconds.

    AWhy this is right: The grace period lets the application finish startup before ECS acts on unhealthy load balancer results.

    BWhy not this: Deregistration delay drains requests from departing targets; it does not protect newly starting tasks.

    CWhy not this: The container start period affects container health checks, not the failing load balancer health checks.

    DWhy not this: The minimum healthy percentage controls deployment capacity, not tolerance for startup health check failures.

    The service health check grace period prevents ECS from replacing newly started tasks because of load balancer health check failures during startup. The container health check start period affects container health checks, which already pass.

    Open this question
  5. Question 55

    SDLC Automation

    CodeDeploy rejects an EC2 deployment revision because appspec.yml is missing, although it exists in a nested directory. Where should the file be placed?

    Show the answer

    Correct answerD. In the revision archive's root directory

    AWhy not this: A scripts directory can contain lifecycle scripts, but the AppSpec file belongs at the archive root.

    BWhy not this: The agent configuration directory contains agent settings, not the deployment revision's AppSpec file.

    CWhy not this: The application destination does not determine where CodeDeploy looks for the revision's AppSpec file.

    DWhy this is right: CodeDeploy requires appspec.yml at the root of an EC2/On-Premises revision archive.

    For an EC2/On-Premises deployment, appspec.yml must be at the root of the revision archive. The application's installation directory is a deployment destination, not where CodeDeploy discovers the revision's AppSpec file.

    Open this question
  6. Question 56

    SDLC Automation

    A team deploys a Lambda function through CodeDeploy using a production alias. Traffic must move to the new version in equal 10-percentage-point increments every minute; which configuration should the team choose?

    Show the answer

    Correct answerB. CodeDeployDefault.LambdaLinear10PercentEvery1Minute

    AWhy not this: This shifts 10% initially and the remaining 90% after five minutes, rather than using repeated equal increments.

    BWhy this is right: This configuration shifts another 10 percentage points of traffic to the new version every minute.

    CWhy not this: This shifts 10% initially and the remaining 90% after ten minutes, rather than using repeated equal increments.

    DWhy not this: This shifts all traffic to the new version at once rather than incrementally.

    LambdaLinear10PercentEvery1Minute shifts traffic in equal 10-percentage-point increments every minute. Canary configurations shift an initial portion, wait for their configured interval, and then shift the remaining traffic together.

    Open this question
  7. Question 57

    SDLC Automation

    An ECS service uses CodeDeploy blue/green deployments behind an Application Load Balancer. Automated integration tests must exercise the replacement task set through the load balancer and block production traffic shifting if they fail; which changes meet these requirements? (Choose two.)

    Choose 2 answers

    Show the answer

    Correct answersA. Add a test listener to the deployment group's load balancer configuration.B. Use an AfterAllowTestTraffic hook to run tests and report their status to CodeDeploy.

    AWhy this is right: A test listener provides a load balancer route to the replacement task set before production traffic shifts.

    BWhy this is right: This lifecycle hook validates the replacement through test traffic and reports whether deployment may continue.

    CWhy not this: ECS blue/green deployments are managed through ECS and CodeDeploy integration, not agents inside application containers.

    DWhy not this: Forwarding production traffic to both target groups exposes the replacement task set before validation succeeds.

    A test listener routes test requests to the replacement task set without shifting production traffic. An AfterAllowTestTraffic hook runs validation and reports success or failure to CodeDeploy; forwarding production traffic to both target groups would expose the unvalidated replacement.

    Open this question
  8. Question 58

    SDLC Automation

    Which traffic-shifting strategies does AWS CodeDeploy support for AWS Lambda deployments? (Choose three.)

    Choose 3 answers

    Show the answer

    Correct answersA. LinearE. CanaryF. All-at-once

    AWhy this is right: Linear shifts equal traffic increments at regular intervals until the new version receives all traffic.

    BWhy not this: Rolling replaces or updates instance batches; it is not a CodeDeploy Lambda traffic-shifting strategy.

    CWhy not this: In-place deployment updates applications on existing EC2 or on-premises instances, not Lambda versions.

    DWhy not this: Immutable deployment uses replacement infrastructure rather than a CodeDeploy Lambda traffic-shifting configuration.

    EWhy this is right: Canary shifts a small percentage of traffic first, then shifts the remainder after a specified interval.

    FWhy this is right: All-at-once shifts all traffic to the new Lambda version immediately.

    CodeDeploy supports canary, linear, and all-at-once traffic shifting for Lambda. Rolling and immutable deployments describe instance-oriented rollout approaches, while in-place deployment updates existing EC2 or on-premises instances.

    Open this question
  9. Question 59

    SDLC Automation

    A CodeBuild project needs a SecureString parameter as an environment variable without storing its value in the buildspec. The service role already has retrieval and decryption permissions. What should the engineer configure?

    Show the answer

    Correct answerB. A parameter-store environment mapping referencing the parameter name

    AWhy not this: A plaintext environment variable passes its configured text literally rather than resolving a Parameter Store reference.

    BWhy this is right: CodeBuild resolves the parameter-store mapping and makes the retrieved value available as an environment variable.

    CWhy not this: Exported variables pass build values to later pipeline actions; they do not retrieve Parameter Store values.

    DWhy not this: An input artifact does not automatically retrieve or decrypt a Parameter Store parameter.

    A parameter-store environment mapping tells CodeBuild to retrieve the parameter and populate the environment variable. A plaintext variable containing the parameter name passes that name literally; it does not retrieve the value.

    Open this question
  10. Question 60

    SDLC Automation

    An EC2 application uses CodeDeploy, and a CloudWatch alarm detects elevated application errors during deployment. Which configuration automatically restores the last known good revision when the alarm enters ALARM?

    Show the answer

    Correct answerA. Attach the alarm and enable automatic rollback when a deployment stops on an alarm

    AWhy this is right: The alarm stops the deployment, and the matching automatic rollback event triggers redeployment of the last known good revision.

    BWhy not this: Notifications report events but do not perform a rollback without additional automation.

    CWhy not this: Stopping prevents further deployment activity but does not automatically restore the previous revision.

    DWhy not this: Failure-triggered rollback alone does not make CodeDeploy monitor or respond to the application alarm.

    CodeDeploy must monitor the alarm and have automatic rollback enabled for deployments stopped by alarms. Stopping a deployment alone does not redeploy the last known good revision.

    Open this question
  11. Question 61

    SDLC Automation

    A deployment records the Secrets Manager credential version it used, and retries must retrieve that exact version even after rotation moves staging labels. Assuming the version remains available, which reference should the deployment record and reuse?

    Show the answer

    Correct answerA. The secret ARN with the version ID

    AWhy this is right: The secret ARN and version ID identify the exact secret version independently of staging-label changes.

    BWhy not this: Custom staging labels can move between versions, so they do not satisfy the requirement when labels change.

    CWhy not this: AWSPREVIOUS can move during subsequent rotations and might not identify the version originally used.

    DWhy not this: AWSCURRENT moves to the newly current version during rotation and cannot pin a retry to an earlier value.

    A version ID identifies a specific secret version and remains stable when staging labels move. AWSPREVIOUS identifies a relative position in rotation history, so it cannot reliably reproduce the version used by an earlier deployment.

    Open this question
  12. Question 62

    SDLC Automation

    A CodePipeline Step Functions invoke action runs a Standard workflow that provisions a test environment, invokes tests, and deletes the environment. Failed assertions arrive as a successful task response containing passed=false; how should the workflow block promotion while still attempting cleanup after assertion failures or task errors?

    Show the answer

    Correct answerA. Check passed with a Choice state, catch task errors, perform cleanup, and route unsuccessful outcomes to a Fail state

    AWhy this is right: Choice handles failed assertions, Catch handles task errors, and a terminal failure blocks promotion after cleanup.

    BWhy not this: Retries address transient errors but do not replace assertion evaluation or unsuccessful execution status.

    CWhy not this: Catching an error and ending successfully hides test failure from the pipeline action.

    DWhy not this: Entering a Fail state terminates execution, so cleanup on the success path cannot handle failed tests.

    The workflow must evaluate assertion results as well as catch task errors, attempt cleanup, and end unsuccessfully for failed tests. A successful execution containing passed=false is still a successful workflow execution and does not itself block promotion.

    Open this question
  13. Question 63

    SDLC Automation

    A CodeBuild project runs unit tests and publishes a coverage report, but builds succeed when coverage falls below the required 80%. What should the team add to enforce the requirement?

    Show the answer

    Correct answerD. A test-runner coverage threshold that fails the build

    AWhy not this: A dashboard alarm provides monitoring rather than directly enforcing the test runner's build result.

    BWhy not this: An artifact preserves the report for later use but does not evaluate coverage or block the build.

    CWhy not this: A report group stores and displays results; it does not automatically enforce a coverage threshold.

    DWhy this is right: An enforced coverage threshold makes insufficient coverage fail the test command and therefore the build.

    Configure the test runner to return a failure when coverage is below 80%, and let that failure fail the build. Publishing results to a report group makes coverage visible but does not itself enforce a minimum.

    Open this question
  14. Question 64

    SDLC Automation

    A mobile application's pipeline must run automated UI tests on real Android and iOS devices without maintaining a device fleet. Which AWS service should the pipeline invoke?

    Show the answer

    Correct answerB. AWS Device Farm

    AWhy not this: CodeBuild provides build environments, not a managed fleet of real mobile devices.

    BWhy this is right: Device Farm provides managed real mobile devices for automated application testing.

    CWhy not this: Amazon Inspector identifies software vulnerabilities rather than executing mobile UI tests.

    DWhy not this: CloudWatch Synthetics runs canaries for endpoints and web applications rather than native mobile tests on real devices.

    AWS Device Farm runs automated mobile application tests on managed real devices. CodeBuild can run build and test tools, but it does not provide a managed fleet of real Android and iOS devices.

    Open this question
  15. Question 65

    SDLC Automation

    A CodePipeline Lambda invoke action starts an external test run that takes 30 minutes and returns a run identifier immediately. How should the Lambda integration keep the action pending without exceeding the Lambda execution limit?

    Show the answer

    Correct answerA. Report job success with a continuation token, then check the run on subsequent invocations

    AWhy this is right: The continuation token preserves test-run context while CodePipeline reinvokes the function to check completion.

    BWhy not this: A 30-minute wait exceeds Lambda's maximum execution duration of 15 minutes.

    CWhy not this: A handler return value does not tell CodePipeline whether its action succeeded or failed.

    DWhy not this: Acceptance of an asynchronous test run does not establish whether its tests passed.

    PutJobSuccessResult with a continuation token keeps the action in progress and causes CodePipeline to invoke the function again with that token. Simply returning a value from the handler does not report a CodePipeline job result.

    Open this question