CICD: CodeCommit, CodePipeline, CodeDeploy, CodeBuild, CloudFormation Flashcards
AWS CodePipeline Service
- continuous delivery service that helps you automate your release pipelines for application and infrastructure
- comprises a series of stages (build, test, deploy)
- you can add an approval action to stage in a pipeline that points to where you want the pipeline to stop so someone can approve; with the required IAM permissions.
- you can configure this action to publish to an SNS topic
- must have at least 2 stages
CodeDeploy: In-Place Deployment
- the application on each instance in the deploy group is stopped
- the latest application version is installed
- the new version of the application is started and validated
CodeDeploy: Deployment Blue/Green
Blue/Green deployment
- EC2 instances in the original environment are replaced by a different set of instances
- Lambda: traffic is shifted from current serverless environment to one with the updated lambda code
CodeDeploy: Deployment Method
- In-place deployment
- Blue/Green deployment
AWS CodeBuild Service
- Continuous Integration
- compiles source code
- runs test cases
- produces software packages that are ready to deploy
- build specification YML lets you choose the commands to run at each phase of the build process.
- cannot trigger a lambda function directly
CodeCommit: Monitoring
- AWS IAM to control and monitor who can access your data, how, when and where.
- Monitor repositories with CloudTrail and CloudWatch
- Use SNS to receive notifications for events impacting your repositories
CodeCommit: Limits
- 1,000 repository limits
- a single blob cannot be more that 2GB
- total size of files in a single commit have a 20MB max
- individual files should not exceed 6MB
AWS CodeDeploy Service
- Fully Managed deployment service
- automates software deployments to EC2, Fargate, Lambda and on-premises servers
CodeDeploy: Deployment Configuration
- a set of deployment rules and deployment success and failure conditions
CodeDeploy: Deployment Group
- individually tagged instances in EC2 Auto Scaling Group.
CodeDeploy: Deployment Lifecycle Events
- ApplicationStop
- DownloadBundle
- BeforeInstall
- Install
- AfterInstall
- ApplicationStart
- ValidateService
CodePipeline: Revision
A change made to the source location defined fo your pipeline
It can include source code, build output, configuration or data.
CodePipeline: Stage
A group of one or more actions.
A pipeline can have two or more stages.
CodePipeline: Action
A task perform on a revision.
Pipeline actions occur in a specified order.
6 Types of actions:
- Source
- Build
- Test
- Deploy
- Approval
- Invoke
CodePipeline: Limits
- Max number of total pipelines per region is 300
- Stage: min 2 max 10
CodeBuild: Project
Define how CodeBuild will run a build.
- Where to get source code
- Which build environment to use
- build commands to run
- where to sore the build output
CodeBuild: Environment
A combination of OS, programming language, runtime and tools used by to build
CodeBuild: Build Specification
YAML file that lets you choose the commands to run at each phase of the build and other settings.
CodeBuild: Compute Capacity
- build.general1.small
3GB RAM, 2vCPU - build.general1.medium
7GB RAM, 4vCPU - build.general1.large
15GB RAM, 8 vCPU
AWS CloudFormation Service
- Model infrastructure in a template file using JSON or YAML.
- Automate the provisioning and updating of Infrastructure in a safe and controlled manager
- Provisioning Mechanism
Which section in CloudFormation template does not allow for condition?
- “Parameters”: Conditions cannot be used within the Parameters section.
Conditions are allowed with:
- Outputs
- Resources
- Condidtions
CloudFormation: Multiple Exported Values
- Exported Output values in CloudFormation must have unique names within a single region
CloudFormation: !FindInMap
!FindInMap [ MapName, TopLevelKey, SecondLevelKey ]
CodeBuild: Timeouts
By setting the timeout configuration the build process will automatically terminate post the expiry of the configured timeout.
Default is 60 minutes.
AWS::Serverless::Function
This resource creates a lambda function
AWS::Serverless::UserPool
Applies to the Congnito service which is used for authentication
AWS::Serverless::API
Describes an API Gateway resource
AWS::Serverless::SimpleTable
Syntax for describing how to create a DynamoDB table