CodeBuild
To build and test the application
Source: Code commit, S3, BitBucket, Github
Build Instruction:
buildspec.yml
- must be at the root of your code
- Components:
env
define environments variablesvariables
: plain text variableparameter-store
: variables for to SSM parameter storessecrets-manager
: variables for AWS secrets manager
phases
specify commands to runinstall
: install dependenciespre_build
: pre-build commandbuild
: build commandpost_build
: post_build command
artifacts
: what will be uploade to s3cache
: files to cache (usually dependencies) to speed up the build
- or specify in Console
Output logs can be stored in
Use CloudWatch Events to detect failed build and CloudWatch Alarms to notify threshold for failure
Build Project can be defined within
Supports a lot of languages. If your language is not supported. Use Docker
Can be run locally using Docker.
Notes
- Cannot access resources in VPC
- To access, you need to do a VPC configure, which specify
- VPC ID
- Subnet IDs
- Security Group IDs
- These configuration must be store in