24. CICD Flashcards

1
Q

Where do you define the CodeBuild build instructions in code?

A

buildspec.yml file at root of code

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

Where in the AWS CICD pipeline can builds be defined?

A

CodePipeline and CodeBuild

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

True or False: CodeDeploy provisions resources.

A

False.

CodeDeploy does not provision resources. it assumes EC2 instances are already provisioned.

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

What are the steps to making CodeDeploy work?

A
  1. each EC2 machine (or on-prem machine) must be running the CodeDeploy Agent
  2. CodeDeploy sends the appspec.yml file
  3. CodeDeploy Agent will report of success/failure of deployment on instance
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a CodeDeploy Hook?

A

Hooks are a set of instructions to deploy the new version (hooks can have timeouts)

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

What does CodeDeploy do if a rollback happens?

A

CodeDeploy redeploys the last known good revision as a new deployment. New deployments will first be deployed to “failed state” instances.

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

What are the ways you can authenticate in Git?

A
  1. SSH Keys: can be configured in IAM Console
  2. HTTPS: done through AWS CLI Authentication
  3. Git credentials
    Helper or generating HTTPS credentials
    - MFA can be enabled for extra safety
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is CodeCommit?

A

A central online repository (AWS version of GitHub)

  • private Git repos
  • no size limit (scale seamlessly)
  • ability to code only in AWS Cloud account = increase security and compliance
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the ways in which you can trigger CodeCommit notifications?

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

What are the CodeCommit use cases for notifications in SNS or AWS Lambda?

A
  1. deletion of branches
  2. trigger for pushes that happen in master branch
  3. notify external build system
  4. trigger AWS Lambda function to perform codebase analysis (maybe credentials got committed in the code)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the CodeCommit use cases for CloudWatch Event Rules?

A
  1. trigger for pull request updates (created / updated / deleted / commented)
  2. commit comment events
  3. CloudWatch Event Rules goes into SNS topic
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is CodePipeline?

A

a visual workflow orchestration service for continuous delivery made of stages

  • each stage can have sequential actions and/or parallel actions
  • stage examples: Build, Test, Deploy, Load Test, etc
  • manual approval can be defined at any stage
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Where do CodePipeline state changes happen?

A

AWS CloudWatch Events which can create SNS notifications

  • you can create CloudWatch events for failed pipelines or cancelled stages (which can in turn create SNS notifications)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What happens if your CodePipeline fails a stage?

A

your pipeline stops and you can get information in the console

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

What should you check first if CodePipeline can’t perform an action?

A

make sure the “IAM Service Role” attached has enough permissions (IAM Policy)

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

List the AWS CodeDeploy AppSpec hooks, in order.

A
  1. ApplicationStop
  2. DownloadBundle
  3. BeforeInstall
  4. AfterInstall
  5. ApplicationStart
  6. ValidateService
17
Q

What is the AWS CLI v1 login command?

A

$(aws ecr get-login –no-include-email –region eu-west-1)

18
Q

What is the AWS CLI v2 login command?

A

aws ecr get-login-password –region eu-west-1 | docker login –username AWS –password-stdin 1234567890.dkr.ecr.eu-west-1.amazonaws.com

19
Q

How is the CLI installed?

A

Via a python script

20
Q

The SDK is available for which programming languages?

A
  1. C++
  2. Go
  3. Java
  4. JavaScript
  5. .NET
  6. NodeJs
  7. PHP
  8. Python
  9. Ruby