CICD Flashcards

1
Q

What 2 ways can you authenticate in Git using CodeCommit?

A
  • SSH keys: AWS users can configure ssh keys in the IAM console
  • HTTPS: Done through the AWS CLI Authentication Helper or Generating HTTPS credentials.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you Authorize users to interact with your code in Git using CodeCommit?

A
  • IAM Policies manage users/roles rights to repos.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How are CodeCommit repos encrypted?

A
  • Encrypted at REST using KMS

- Encrypted in transit using SSH or HTTPS

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

How do you provide Cross Account access to your CodeCommit repos?

A

Use IAM role in your AWS account and use AWS STS with AssumedRole API.

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

What 3 services does CodeCommit integrate with for notifications?

A
  • SNS
  • Lambda
  • CloudWatch Event Rules
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What type of events would you use SNS/Lambda notification integration for in CodeCommit?

A

Branch events or action in the master branch

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

What type of events would you use Cloudwatch Event Rules notification integration for in CodeCommit?

A

PR or commit comments

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

What is Code Pipeline?

A

It is an orchestration tool to visualize your workflow from source, build, test and deployment

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

What is a CodePipeline Artifact?

A

It is a file that is passed from one stage in the workflow to the next, stored in S3.

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

What happens when CodePipeline state changes?

A

A Cloudwatch Event is triggered, which can create SNS notifications.

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

What happens if CodePipeline fails a stage?

A

The pipeline stops and more information is available in the console.

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

What could be the cause of CodePipeline being unable to perform an action?

A

The IAM Service Role assigned to the Pipeline does not have the correct permissions.

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

How do you define build instructions for CodeBuild?

A

In a file called buildspec.yml at the root of the code

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

How do you define secret variables in the buildspec.yml file?

A

Use SSM Parameter Store

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

What are the 4 phases covered in the buildspec.yml file?

A
  • Install
  • PreBuild
  • Build
  • Post Build
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How can you improve CodeBuild buildspec performance?

A

Cache dependencies in an S3 Cache Bucket

17
Q

What do you need to run/debug CodeBuild locally?

A

CodeBuild Agent and Docker

18
Q

What is CodeDeploy used for?

A

Its used for deploying code to multiple EC2 instances

19
Q

What are the 6 steps to make CodeDeploy work?

A
  • Run CodeDeploy Agent on each instance
  • The Agent must continuously poll for CodeDeploy work.
  • CodeDeploy will send the appspec.yml file to the Agent
  • The application is pulled from Github or S3
  • EC2 will run the deployment instructions
  • Agent will report success/failed deployment on the instance
20
Q

Can you do Blue/Green deployments in CodeDeploy?

A

Yes, but only in EC2 instances, not on premise

21
Q

What are the sections of the appspec.yml file for CodeDeploy?

A
  • File section that describes how to source and copy from Github/S3 to filesystem
  • Hooks, which are a set of instructions to follow to deploy the new version.
22
Q

What is the correct order of the 6 Hooks for CodeDeploy?

A
  • ApplicationStop
  • DownloadBundle
  • BeforeInstall
  • AfterInstall
  • ApplicationStart
  • ValidateService
23
Q

What are the 4 possible Deployment Configs for CodeDeploy?

A
  • One at a time
  • Half at a time
  • All at once
  • Custom
24
Q

What is the behavior of a failed deployment in CodeDeploy?

A

The failed instance stays in the Failed state, and new deployments will be deployed to the failed instances first.

25
Q

What are the 4 possible Deployment targets for CodeDeploy?

A
  • EC2 instances with tags
  • Directly to Auto Scaling Group
  • Mix of ASG/Tags so you can build deployment segments.
  • Customization in scripts with DEPLOYMENT_GROUP_NAME env variables.