AWS 15, 16, 17 Flashcards
How do we enable Cross Account in CodeCommit?
Use IAM Role in your AWS Account and use AWS STS (with AssumeRole API)
How can you trigger CodeCommit notifications?
AWS SNS, AWS Lambda or AWS CloudWatch Event Rules
What are artifacts in CodePipeline?
Artifacts are stored in Amazon S3 and passed on to the next stage. It is the result of the previous stages action.
What must you do before you can interact (clone, pull, push, etc) with a CodeCommit repository?
You must generate credentials for either HTTPS or SSH in IAM for the User you are using.
What is the CodePipeline service role?
It is an IAM role that allows CodePipeline to communicate with the services it needs to
Stages in CodePipeline cannot have multiple Action Groups, true or false?
False. Stages can have multiple action groups
How can we define our CodeBuild build instructions?
With a buildspec.yml file. Must be root of directory.
How can we speed up our building of an artifact in CodeBuild?
We can choose the cache option to store needed dependencies for our build
By default, your CodeBuild containers will be launched inside your VPC, true or false?
False. They will be launched outside. Therefore, it cannot access resources in a VPC. You must specify a VPC configuration.
What are the steps to make CodeDeploy work?
Each EC2 machine (or On Premise machine) must be running the CodeDeploy Agent;
The agent is continuously polling AWS CodeDeploy for work to do;
Application is pulled from GitHub or S3;
EC2 will run the deployment instructions;
CodeDeploy Agent will report success / failure of deployment on the instance
How are EC2 instances grouped in CodeDeploy?
They are grouped by deployment group (dev / test/ prod)
What is the order of the hooks in CodeDeploy?
ApplicationStop; DownloadBundle; BeforeInstall; AfterInstall; ApplicationStart; ValidateService;
What are the two primary types of deployment targets for AWS CodeDeploy?
Set of EC2 instances with tags, or directly to an ASG. Can do a mix of both if needed/wanted/
Before we can do CodeDeploy with EC2 instances, what must we do?
Make sure the Instances have the CodeDeploy agent;
We must create two IAM roles. We need to create one for CodeDeploy to interact with other AWS services and create one for our EC2 so that it can access necessary resources.
What file must be present for your application in CodeDeploy?
appspec.yml ; Must be at root directory.
What are the two deployment types for CodeDeploy?
In-place and Blue/Green
What are the three provided deployment configurations for CodeDeploy Deployment Group?
AllAtOnce, OneAtATime, HalfAtATime
Regarding in-place deployments between CodeDeploy and an ASG, what happens to instances that are created after a deploy by the ASG?
CodeDeploy and ASG will go ahead and run a deployment on those instances
For a Blue/Green deployment in CodeDeploy with an ASG, what must we make sure we have?
We need an ELB. A new target group will be created to deploy the new instances and versions and health check them. Then the ELB will route to the new versions in the new target group. Will get rid of the old one.
If a rollback happens in CodeDeploy, what happens?
CodeDeploy redeploys the last known good revision as a new deployment. So we will get a new deployment id.
What is CodeStar?
It quickly builds a project with a CICD pipeline, repository, possible IDE, team member access and other project needs.
Which AWS Service helps you run automated test in your CICD?
CodeBuild
You are looking to automatically trigger a code analysis at each commit in CodeCommit to ensure your developers haven’t committed secret credentials. How can you achieve this?
Integrate SNS / Lambda with CodeCommit
You want to send email alerts anytime pull requests are open or comments are added to commits in CodeCommit. You should use
AWS CloudWatch events that push to SNS