Dev Tools Flashcards
What is Amplify?
Helps developers quickly build full stack apps (mobile & web apps) by providing tools, libraries and services
Name 3 features of Amplify?
- Framework flexibility
- Figma integration for design
- AWS Device Farm for testing
What does CI/CD stand for?
Continuous Integration / Continuous Delivery which helps developers build, test & deploy their changes
What is Cloud9?
Cloud9 is a web-based IDA for coding and debugging
It consists of 2 main components:
1. The development environment (EC2-based (aws manages instance) or SSH-based (you manage instance)) and the IDE itself
Its best used for serverless development (AWS Lambda) and it is free
What is Cloud Shell?
Cloud Shell is a browser-based Linux shell within the AWS Management Console that offers secure access to AWS CLIs and tools
- It is pre-configured with the user’s AWS credentials so don’t need dev setup
- Includes AWS CLI and CLIs for services like Elastic Beanstalk, ECS and Serverless Application Model (SAM)
- Includes access to command-line tools like Python or Node.js
- Provides up to 1GB of persistant storage
It simplifies the AWS Sercice interaction for developers and administrators
What is Code Commit?
Code commit is a managed git-based source control service
- starting point for CI/CD pipelines
- integrates with Build, Deploy and Pipeline
- Serverless & managed
- 3 conntection options: HTTPS, SSH, HTTPS (GRC)
- IAM for fine grained access control
- pricing based on active users
Name 2 options for enabling event-driven workflows in Code Commit?
- Send notification such as AWS Chatbot, Slack, SNS
- Use actions such as SNS /lambda or rule templates such as requiring approvals on prs etc)
What is Code Build do?
Build phase of CI/CD pipeline
It revolves around 3 core concepts (CodeBuild project, Build environment, Build File)
It also determines where you save output artifacts (ie., s3 bucket)
What is Code Deploy do?
Deploys for us
What are the 3 core concepts AWS Build revolves around?
Code (Code build project)
Build env (ie., Docker)
Build file (YAML)
The buildspec file is a critical component in CodeBuild that guides the build process.
Describe key info you need to know about build spec file..
Should be named ‘buildspec.yml’ and placed in code root directory (can override this)
Consists of 9 sections:
(RAVER BCPP)
Run-as (linux commands)
Artifacts (storage location ie., s3)
Version
Enviroment
Reports (for test results)
Batch (build instructions)
Cache (optimizes build)
Phases (commands for install, pre-build, build, post-build)
Proxy (config proxy server settings)
What does Code Pipeline do?
Wires pieces together
You fill out info for these 6 actions:
- approval
- source
- build
- test
- deploy
- invoke
It will follow all these it integrates all the steps
What is Code Star?
Code Star (*)
can pull different CI/CD pipelines together
ie., dev, test, prod
it simplifies and speed sup the dev, testing and deployment of apps
What file do you use to configure CodeDeploy
AppSpec File
What are the 3 main components of code deploy?
Application
Deployment Group
Deployment
What is the application component of Code Deploy?
Create application & select deployment platform as either EC2/on-premises, Lambda or ECS
What is the Deployment Group part of Code Deploy?
Define the deployment group which will be:
- A group of servers for EC2
- Clusters, load balancers & target groups for ECS
- Specific settings for Lambda deployments
What is the Deployment Configuration part of Code Deploy?
Control deployment speed using config such as Canary (gradually direct traffic to the new code)
Linear (incrementally increase traffic over time)
AllAtOnce
EC2 allows blue/green strategies
What is code deploy agent?
Communicates with code deploy over HTTPs port 443
What 2 services can Code Deploy integrate with for event notifications?
Cloud Watch
and
SNS
Name the file Code Deploy uses to help you run and manage scripts during deployment
AppSpecFile
The AppSpecFile helps you run and manage scripts during deployment. What do you put in the EC2 appspec?
- Version
- Operating System
- Hooks (different deployment scripts to run at phases Before Install, Install etc)
- Files to copied to the instance
- Permissions
What is the AppSpec fie in Lambda?
Hooks run lambda functions for deployment validations
Resource:
What does is the difference in the AppSpec file for EC2/on-premise and AppSpec file for Lambda
Lambda and ECS: versions, resources, hooks
EC2: version, OS, hooks, files, permissions
What is X-Ray
Designed for TRACING and flow requests through your apps.
Can be used to pinpoint bottlenecks & to understand how different services are interconnected
Name 4 things that give us visibility and observability into our systems?
Cloud Watch
Cloud Trail
VPC Flow Logs
X-Ray
Name valid deployment configurations for Code Deploy?
OneAtATime
HalfAtATime
AllAtOnce
Custom: (based on conditions)
Canary10Percent5Minutes: deploy 10% instances, monitor for 5 mins before deploying the rest
Canary10Percent10Minutes
Canary10Percent15Minutes
Linear10PercentEvery1Minute: Deploys to 10% of instances and increases the % every minute
Linear10PercentEvery2Minutes
Linear10PercentEvery3Minutes
Can you use the X-Amzn-Trace-Id tracing header to send AWS X-Ray trace headers through Amazon SQS?
Yes
Can you use the AWSTraceHeader message system attribute to send X-Ray trace headers through SQS?
Yes
You need to IDENTIFY bottlenecks in LAMBDA FUNCTIONS & provide solutions.
What will be your main tool?
X-Ray
You might think Cloud Watch, but once you find a time you might look at Cloud Watch logs
What is CI?
CI is continuously integrating code from multiple developers into a shared code base
What AWS tools do you use for CI?
Code Build
Code Pipeline
Code Commit
What is CI and name its benefits
CI tests our code & checks it works as expected
Ensures maintain high quality & ensures don’t introduce errors
Describe blue/green deployment?
blue/green is when you run two versions of the application at the same time
After the new version runs successfully, the service will be switched to the new version so that the service can run continuously.
What is CD doing?
After CI, it deploys it on an environment that looks like the environment to check if it works
10 points about CD?
- Continuously run code
- Modular code
- Proritise security
- Start new dev as MONOLITHS
- Gradually refactor monnoliths into microservices
- Use immutable/mutable servers with caution to avoid “snowflake” servers
- Implement no/low downtime deployments ie., green, blue and canary
- Aim for seamless releases
What is code guru
List steps of the CI/CD pipeline?
- Commit change (Code Commit)
- Trigger build
- Build
- Notify of build outcome
- Run test
- Notify of test outcome
- Deliver build to environment
- Deploy where necessary
What does Code Artifact do?
Keeps packages and artifacts for deployment
Describe Code Commits 3 connection options
HTTPS (convenient, firewall friendly)
SSH (enhanced security)
HTTPS (GRC) for temp credentials
What 2 actions can you choose between when configuring a new deployment type in AWS CodeDeploy?
blue-green (increases availability, reduces risk)
in-place (minimal disturbance to underlying infrastructure)
Is it true that mutable servers scale less effectively than immutable servers
Yes
In which stage of the AWS CodePipeline is the code deployment setup run?
staging