AWS AWS DevOps and Developer Tools 5 — Questions and Answers
Question 1: Which CodePipeline integration allows you to automatically trigger a pipeline when a pull request is opened in a GitHub repository?
- Amazon EventBridge with CodeStar Connections (Correct answer)
- AWS Lambda polling GitHub API
- S3 bucket notifications
- CloudWatch Events on CodeCommit
Correct answer: Amazon EventBridge with CodeStar Connections
CodeStar Connections paired with EventBridge enables webhooks from GitHub, Bitbucket, or GitLab to automatically trigger CodePipeline executions on PR events.
Question 2: In CodeBuild, which cache type stores dependencies in an Amazon S3 bucket to speed up subsequent builds?
- Local cache
- S3 cache (Correct answer)
- In-memory cache
- EFS cache
Correct answer: S3 cache
S3 cache in CodeBuild uploads cached directories to an S3 bucket after a build and downloads them at the start of the next build to reduce dependency installation time.
Question 3: What does the 'canary' deployment configuration in AWS CodeDeploy do?
- Deploys to all instances simultaneously
- Shifts a small percentage of traffic to the new version first, then completes the rollout (Correct answer)
- Deploys only to instances with a specific tag
- Runs a blue/green swap with zero traffic shift
Correct answer: Shifts a small percentage of traffic to the new version first, then completes the rollout
Canary configurations route a small initial percentage of traffic (e.g., 10%) to the new deployment, wait for validation, then shift the remaining traffic.
Question 4: Which AWS service provides a managed Git repository hosting service fully integrated with AWS IAM for access control?
- AWS CodeBuild
- AWS CodeCommit (Correct answer)
- AWS CodePipeline
- AWS CodeDeploy
Correct answer: AWS CodeCommit
AWS CodeCommit is a fully managed source control service that hosts private Git repositories with IAM-based authentication and authorization.
Question 5: When using AWS SAM (Serverless Application Model), what command packages and deploys your serverless application?
- sam build && sam deploy (Correct answer)
- sam package && sam push
- sam compile && sam release
- sam init && sam publish
Correct answer: sam build && sam deploy
'sam build' compiles the application and 'sam deploy' uploads artifacts to S3 and deploys the CloudFormation stack for serverless resources.
Question 6: In AWS X-Ray, what is a 'segment' in the context of request tracing?
- A CloudWatch metric data point
- A record of work done by a single service or resource for a traced request (Correct answer)
- An IAM permission boundary
- A network packet capture
Correct answer: A record of work done by a single service or resource for a traced request
A segment represents the computation work done by one component (like a Lambda function or EC2 app) and contains timing, metadata, and subsegment data for a traced request.
Question 7: Which feature in AWS CodeArtifact allows packages from public repositories like npm or PyPI to be automatically fetched and cached when not found locally?
- Upstream repositories (Correct answer)
- Package groups
- Domain policies
- Cross-account sharing
Correct answer: Upstream repositories
Upstream repositories in CodeArtifact let you proxy and cache packages from public registries, so clients pull from CodeArtifact even when fetching public packages.
Which CodePipeline integration allows you to automatically trigger a pipeline when a pull request is opened in a GitHub repository?