SDLC Automation Flashcards

1
Q

You need to automate the deployment of your application using AWS CodePipeline. What action can trigger the pipeline?
A) Manual invocation
B) Code commit
C) Schedule
D) All of the above

A

D) All of the above

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Which AWS service is best suited for building and deploying containerized applications?
A) AWS Fargate
B) AWS CodeDeploy
C) AWS CodePipeline
D) Amazon EC2

A

A) AWS Fargate

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

You want to automate the process of pushing your code changes to a test environment. Which AWS service can integrate with Git for this purpose?
A) AWS CodePipeline
B) AWS CodeDeploy
C) AWS Elastic Beanstalk
D) AWS CodeCommit

A

A) AWS CodePipeline

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Which tool allows you to provision and manage infrastructure using code?
A) AWS CodeBuild
B) AWS CodePipeline
C) AWS CloudFormation
D) Amazon EC2

A

C) AWS CloudFormation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

You want to automatically roll back a deployment if an error is detected. Which AWS service can help?
A) AWS CodeDeploy
B) AWS Elastic Beanstalk
C) AWS CloudFormation
D) AWS Lambda

A

A) AWS CodeDeploy

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

You want to automatically deploy changes to your application from GitHub to an S3 bucket for a static website. Which AWS service would you use?
A) AWS CodePipeline
B) AWS CodeDeploy
C) AWS CodeBuild
D) AWS CloudFormation

A

A) AWS CodePipeline

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

In AWS CodePipeline, which stage would you use to deploy changes to an Amazon EC2 instance?
A) Source stage
B) Build stage
C) Deploy stage
D) Test stage

A

C) Deploy stage

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Which AWS service is commonly used to perform continuous integration by compiling and testing code after each change?
A) AWS CodeBuild
B) AWS CloudFormation
C) AWS Elastic Beanstalk
D) AWS CodeDeploy

A

A) AWS CodeBuild

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

You need to automate the creation of a continuous integration and continuous delivery (CI/CD) pipeline that builds, tests, and deploys your application. Which AWS service would you choose?
A) AWS CodePipeline
B) AWS CloudFormation
C) AWS CodeCommit
D) AWS CodeDeploy

A

A) AWS CodePipeline

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Which AWS service integrates with Jenkins for continuous integration in a hybrid cloud environment?
A) AWS CodePipeline
B) AWS CodeDeploy
C) AWS CodeBuild
D) AWS CodeCommit

A

C) AWS CodeBuild

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

You need to automate the testing of your application with every code push. Which AWS service should you use to perform automated testing?
A) AWS CodeBuild
B) AWS CodeDeploy
C) AWS Elastic Beanstalk
D) AWS CloudFormation

A

A) AWS CodeBuild

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Which AWS service allows you to define, provision, and manage AWS infrastructure as code?
A) AWS CloudFormation
B) AWS CodePipeline
C) AWS CodeCommit
D) AWS Lambda

A

A) AWS CloudFormation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

You want to trigger a Lambda function whenever new code is committed to your repository. Which AWS service can you integrate to achieve this?
A) AWS CodePipeline
B) AWS CodeCommit
C) AWS CloudWatch Events
D) AWS CodeBuild

A

A) AWS CodePipeline

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

In AWS CodePipeline, which action must be configured to automatically deploy your application after the build phase?
A) A deploy action in the deployment stage
B) A manual approval action
C) A source action in the build stage
D) A trigger in AWS CloudWatch Logs

A

A) A deploy action in the deployment stage

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Which AWS service provides source control and allows you to create and manage Git repositories?
A) AWS CodeCommit
B) AWS CodeBuild
C) AWS CodePipeline
D) AWS Lambda

A

A) AWS CodeCommit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Which AWS service allows you to automate the creation of a CI/CD pipeline for deploying containerized applications?
A) AWS CodePipeline
B) AWS Elastic Beanstalk
C) Amazon ECS
D) AWS CodeBuild

A

A) AWS CodePipeline

17
Q

You need to implement continuous delivery for your application with a fully managed service. Which AWS service should you choose?
A) AWS CodeDeploy
B) AWS CodePipeline
C) AWS CodeBuild
D) AWS Elastic Beanstalk

A

B) AWS CodePipeline

18
Q

How can you trigger AWS CodeBuild to automatically build and test code when changes are pushed to your repository?
A) Use webhooks from CodeCommit
B) Configure a build trigger in CodePipeline
C) Use AWS CloudTrail
D) Use AWS IAM roles

A

B) Configure a build trigger in CodePipeline

19
Q

In a CI/CD pipeline, what action should follow the build stage to ensure that the application passes quality checks?
A) Testing
B) Deployment
C) Monitoring
D) Logging

A

A) Testing

20
Q

Which AWS service can integrate with Jenkins for managing continuous integration pipelines?
A) AWS CodeBuild
B) AWS CloudFormation
C) AWS CodeCommit
D) AWS CodePipeline

A

A) AWS CodeBuild

21
Q

Where are artifacts in Code Pipeline Stored?

A

S3

22
Q

What are some possible sources for CodePipeline?

A

AWS ECR
AWS S3
Bitbucket
GitHub
GitLab

23
Q

What is the primary difference between using polling and events to trigger an action in AWS CodePipeline?

A) Polling checks for changes at regular intervals, while events provide real-time notifications.
B) Events require manual configuration, while polling is automatic.
C) Polling can only trigger Lambda functions, while events can trigger any AWS service.
D) Events are not supported by AWS CodePipeline.

A

Answer: A) Polling checks for changes at regular intervals, while events provide real-time notifications.

Explanation: Polling requires CodePipeline to check periodically for updates in the source repository, which can lead to slight delays. Events (e.g., using webhooks) enable immediate triggering of the pipeline when a change is detected, providing faster response times.

24
Q

You set up a CodePipeline that pulls code from GitHub. What is the advantage of using a webhook over polling in this setup?

A) Webhooks reduce the amount of API calls needed to check for updates.
B) Webhooks allow scheduled triggers at fixed intervals.
C) Polling is faster than webhooks in detecting changes.
D) Webhooks require AWS Lambda integration to work with CodePipeline.

A

Answer: A) Webhooks reduce the amount of API calls needed to check for updates.

Explanation: Webhooks provide real-time notifications to CodePipeline whenever a change is made, eliminating the need for continuous API calls. This reduces overhead and provides immediate triggering without the delay associated with polling.

25
Q

What are the permissions needed at the IAM level for the user to have manual approval access?

A

{
“Version”: “2012-10-17”,
“Statement”: [
{
“Effect”: “Allow”,
“Action”: [
“codepipeline:ListPipelines”
],
“Resource”: [
“*”
]
},
{
“Effect”: “Allow”,
“Action”: [
** “codepipeline:GetPipeline”,
“codepipeline:GetPipelineState”,
“codepipeline:GetPipelineExecution”
],
“Resource”: “arn:aws:codepipeline:us-east-2:80398EXAMPLE:MyFirstPipeline”
},
{
“Effect”: “Allow”,
“Action”: [
** “codepipeline:PutApprovalResult”

],
“Resource”: “arn:aws:codepipeline:us-east-2:80398EXAMPLE:MyFirstPipeline/MyApprovalStage/MyApprovalAction”
}
]
}

26
Q

What is the most important file that lives in CodeBuild?

A

buildspec.yml

27
Q

Where should the buildspect.yml be located?

A

At the root of your directory

28
Q

What are the main pieces of the buildspec.yml file?

A

Env - define env variables
* plaintext variables
* parameter-store: variables stored in SSM parameter store
* secrets-manager: variables stored in AWS Secret Manager
Phases - specify commands to run:
* install
* pre_build
* build
* post_build
Artifacts - what to upload to S3
Cache - files to cache

29
Q

True or False.
By default, CodeBuild containers are launched within your VPC and have access to resources in VPC.

A

False, by default CodeBuild containers are launched outside your VPC.

You can specify a VPC configuation to allow access to all VPC resources.

30
Q

Is it possible to add CodeBuild to CodePipeline without starting over?

A

Yes, you just have to change the primary source and uncheck ‘rebuild everytime a code change is pushed to this repo’. Essentially take it out of GitHub to use the CodePipeline trigger instead.

CodePipeline will be triggered with GitHub change, but and CodeBuild will be triggered downstream.

31
Q

What are some services you can deploy onto using CodeDeploy?

A

EC2 Instances, On-prem servers, Lambda functions, ECS Services

32
Q

What is CodeDeploy Agent?

A

The agent that runs the code deploy on the service (EC2, On Prem, Lambda, etc)

33
Q

What is artifact management?

A

storing and retreiving dependencies (software packages that depend on each other to be built)

34
Q

What is CodeArtifact?

A

A secure, scalable and cost-effective artifact management for software devlopment

35
Q
A