Dev Tools Flashcards
What are the 6 sections of CloudFormation
AWSTEmplateFormationVersion - “2010-09-09” -> Internal AWS use.
Description - Comments about the Template itself.
Resources (MANDATORY) - AWS Resources to create
Parameters - Dyanminc Inputs
Mappings - Static Variables for Template
Outputs - What has been created
Conditions - Conditions to perform resource creation.
WHen to use CDK
CDK - Cloud Dev Kit sits on top of Cloud Formation and lets you build your own infrastructure using common programming languages such as java/python/.NET
Which type of credenytials CANNOT be used by CodeCommit ?
IAM username and password - IAM username and password credentials cannot be used to access CodeCommit.
How to stop long running CodeBuild jobs?
Enable CodeBuild timeouts
When possible, builds run concurrently. The maximum number of concurrently running builds can vary.
Builds are queued if the number of concurrently running builds reaches its limit. The maximum number of builds in a queue is five times the concurrent build limit.
A build in a queue that does not start after the number of minutes specified in its time out value is removed from the queue. The default timeout value is eight hours. You can override the build queue timeout with a value between five minutes and eight hours when you run your build.
By setting the timeout configuration, the build process will automatically terminate post the expiry of the configured timeout.
What does Transform in CloudFormation imply?
Presence of Transform section indicates it is a Serverless Application Model (SAM) template
What are the CodeDeploy hooks?
Start
ApplicastionStop
DOwnbloadBundle
BeforeINstall
Install
AfterInstall
ApplicatioSTart
ValidateService
End
apsec.yml v buildspec.yml
????
deployment to Elastic Beanstalk is taking a very long time due to resolving dependencies on all of your 100 target EC2 instances. what can you do to improve time.
Bundle the dependencies in the source code during the build stage of CodeBuild
What is CodeDeploy Agent
“CodeDeploy Agent”
The CodeDeploy agent is a software package that, when installed and configured on an instance, makes it possible for that instance to be used in CodeDeploy deployments. The CodeDeploy agent archives revisions and log files on instances. The CodeDeploy agent cleans up these artifacts to conserve disk space. You can use the :max_revisions: option in the agent configuration file to specify the number of application revisions to the archive by entering any positive integer. CodeDeploy also archives the log files for those revisions. All others are deleted, except for the log file of the last successful deployment.
Immutable deploy v blue green
The main difference is that in the immutable update, the new instances serve traffic alongside the old ones, while in the blue/green this doesn’t happen (you have an instant complete switch from old to new)
Blue/Green = new environment. New load balancer. DNS switch.
Immutable = new ASG alongside old one. Then terminates old one.
How does CodeBuild scale?
AWS CodeBuild is a fully managed build service in the cloud. CodeBuild compiles your source code, runs unit tests, and produces artifacts that are ready to deploy. CodeBuild eliminates the need to provision, manage, and scale your own build servers. It provides prepackaged build environments for popular programming languages and build tools such as Apache Maven, Gradle, and more. You can also customize build environments in CodeBuild to use your own build tools. CodeBuild scales automatically to meet peak build requests.
If CloudFormation doesnt support a resource, how do you get around it ?
Use Custom Resource
You want to create a CloudFormation stack in multiple AWS accounts in multiple AWS Regions. What is the easiest way to achieve this?
CF StackSets
What are Cloud FOrmation PSUEDO PARAMETERS
These are fixed parameters available by default. Examples:
AWS::AccountId
AWS::Region
AWS::
How to use CF Mappings?
Mappings are like dictionaries
Parameters:
MyType:
Type: String
AllowedValues:
- t2.micro
- t3.micro
Default: t2.micro
InstanceType: !Ref MyType