AWS CodeBuild Flashcards

1
Q

AWS CodeBuild Principles ?

A

AWS CodeBuild is a fully managed continuous integration (CI) service that compiles source code, runs tests, and produces software packages that are ready to deploy.

With CodeBuild, you don’t need to provision, manage, and scale your own build servers.

CodeBuild scales continuously and processes multiple builds concurrently, so your builds are not left waiting in a queue.

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

CodeBuild Pricing

A

You pay based on the time it takes to complete the builds.

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

CodeBuild Encryption

A

CodeBuild is integrated with KMS for encryption of build artifacts, IAM for build permissions, VPC for network security, and CloudTrail for logging API calls.

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

(buildspec.yml), what is it ?

A

Build instructions can be defined in the code (buildspec.yml).

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

How can CodeBuild Detect Failures

A

You can use CloudWatch alarms to detect failed builds and trigger SNS notifications.

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

Benefits of CodeBuild

A
  • Fully managed by AWS.
  • On-demand and scales seamlessly.
  • Pre-configured environments for many programming languages.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

CodeBuild Concepts - Build Project ?

A

Build projectdefines how CodeBuild will run a build defines settings including:

  • Location of the source code.
  • The build environment to use.
  • The build commands to run.
  • Where to store the output of the build.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

CodeBuild Concepts - Build environment

A

Build environment – the operating system, language runtime, and tools that CodeBuild uses for the build.

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

CodeBuild Concepts - Build Specification

A

Build Specification – a YAML file that describes the collection of commands and settings for CodeBuild to run a build.

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

Preconfigured Build Environments ?

A

AWS CodeBuild provides build environments for Java, Python, Node.js, Ruby, Go, Android, .NET Core for Linux, and Docker.

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

Customized Build Environments ? How would that work ?

A

You can bring your own build environments to use with AWS CodeBuild, such as for the Microsoft .NET Framework.

You can package the runtime and tools for your build into a Docker image and upload it to a public Docker Hub repository or Amazon EC2 Container Registry (Amazon ECR).

When you create a new build project, you can specify the location of your Docker image, and CodeBuild will pull the image and use it as the build project configuration.

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

Specifying Build Commands, why ?

A

You can define the specific commands that you want AWS CodeBuild to perform, such as installing build tool packages, running unit tests, and packaging your code.

The build specification is a YAML file that lets you choose the commands to run at each phase of the build and other settings.

You can override the default buildspec file name and location.

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

Should you have the buildspec.yml at the root of your project ?

A

Exam tip: You must have a buildspec.yml file at the root of your source code.

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

How can you defined variables ?

A
  • Plaintext variables.
  • Secure secrets using the SSM Parameter store.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are the phases of the build process ?

A
  1. Install: install dependencies you may need for the build.
  2. Pre-build: final commands to execute before build.
  3. Build: actual build commands.
  4. Post build: finishing touches (e.g. zip file output).

Artifacts: these get uploaded to S3 (encrypted with KMS).

Cache: files to cache (usually dependencies) to S3 for future builds.

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

CodeBuild Local Build

A

In case you need to do deep troubleshooting beyond analyzing log files.

Can run CodeBuild locally on your computer using Docker.

Leverages the CodeBuild agent.

17
Q
A