Misc Flashcards
What are the lifecycle event hooks for CodeDeploy?
- Start (Cannot be scripted)
- BeforeInstall (EC2 only)
- Install (Cannot be scripted)
- AfterInstall (EC2 only)
- AllowTestTraffic (Cannot be scripted)
- AfterAllowTestTraffic (EC2 only)
- BeforeAllowTraffic (Lambda / EC2)
- AllowTraffic (Cannot be scripted)
- AfterAllowTraffic (Lambda / EC2)
- End (Cannot be scripted)
Where are CodeDeploy deploy instructions written? (in what file?)
Appspec.yml
What can you deploy to with CodeDeploy?
EC2, On Premise, Lambda and ECS
What type of deployments can you do with CodeDeploy?
In-Place or Blue/Green
What are the Elastic Beanstalk deployment options?
All at once Rolling Rolling with additional batch Immutable Blue/Green (Traffic Splitting Deployment Policy)
Which Elastic Beanstalk deployments deploy to new instances?
Rolling with additional batch
Immutable
What are the components of ECS?
- Cluster: Multiple EC2 instances which will house the docker containers
- Task Definition: A JSON file that defines the configuration of (up to 10) containers you want to run
- Task: Launches containers defined in Task Definition. Tasks do not remain running once the workload is complete
- Service: Ensures tasks remaining running eg. web app.
- Container Agent: Binary on each EC2 instance which monitors, starts, and stops tasks
What is the X-Ray header called which identifies a trace that passed along to downstream services
The Tracing Header is named X-Amzn-Trace-Id
What X-Ray component provides the resource’s name, details about the request, and details about the work done?
Segments
What X-Ray component provides more granular timing information and details about downstream calls that your app made to fulfill the original request?
Subsegments
What X-Ray component collects all segments generated by a single request so you can track the path of requests through multiple services?
Traces
What X-Ray component provides a flow chart visualization of average response for micro-services and to visually pinpoint the failure?
Service Graph
X-Ray supports which languages?
Go, NodeJS, Ruby, Java, Python, ASP.NET, PHP
X-Ray integrates with which AWS Services?
Lambda, API Gateway, App Mesh, CloudTrail, CloudWatch, AWS Config, EB, ELB, SNS, SQS, EC2, ECS, Fargate
In X-Ray, what allows you to capture additional information in key-value pairs?
Annotations and Metadata.
- Annotations are indexed for use with filter expressions with a limit of 50
- Metadata are not indexed. Use Metadata to record data you want to store in the trace but don’t need to use for searching traces
How does the X-Ray Daemon work?
X-Ray Daemon is a software application that listens for traffic on UDP port 2000, gathers raw segment data, and relays it to the AWS X-Ray API. Data is generally not sent directly to the X-Ray API and passes through the X-Ray Daemon which uploads in bulk
Which AWS service would allow the developer to fully test and debug any resource based policies before deploying the changes?
AWS Trusted Advisor is an online tool that provides you real time guidance to help you provision your resources following AWS best practices.
What ElastiCache feature is used to manage runtime settings?
Parameter groups.
Parameter groups are an easy way to manage runtime settings for supported engine software. Parameters are used to control memory usage, eviction policies, item sizes, and more. An ElastiCache parameter group is a named collection of engine-specific parameters that you can apply to a cluster. By doing this, you make sure that all of the nodes in that cluster are configured in exactly the same way.
What does a VPC flow log do?
capture all incoming and outgoing IP traffic within your VPC.
How to enable CloudWatch alarms triggered on a 10 second interval basis?
High Resolution Metrics can be as low as 10 seconds.
What RDS feature allows to see how different processes or threads on a DB instance use the CPU?
Enhanced Monitoring
How would you troubleshoot an EC2 application’s memory usage in CloudWatch?
Install CloudWatch Agent
Can you create access keys for an IAM role?
No, you cannot. Only for IAM users.
Using API Gateway with HTTP proxy for backend endpoints, how would you direct traffic to different endpoints for different stages e.g. dev, QA, prod?
Use stage variables in the HTTP integration request of the API.
With deployment stages in API Gateway, you can manage multiple release stages for each API, such as dev, QA and production. Using stage variables, you can configure an API deployment stage to interact with different backend endpoints.
A company currently uses API Gateway as part of their production environment. There is a requirement for a specific stage in the gateway to be able to interact directly with a DynamoDB table.
Which API Gateway component would they have to configure in order to achieve this functionality?
An Integration request.
With DynamoDB as the backend, the API developer sets up the integration request to forward the incoming method request to the chosen backend. The setup includes specifications of an appropriate DynamoDB action, required IAM role and policies, and required input data transformation. The backend returns the result to API Gateway as an integration response.
To route the integration response to an appropriate method response (of a given HTTP status code) to the client, you can configure the integration response to map required response parameters from integration to method. You then translate the output data format of the backend to that of the frontend, if necessary. API Gateway enables you to define a schema or model for the payload
Elastic Beanstalk two environment types?
Web Environment or a Worker Environment
Elastic Beanstalk web environment two types are?
Single-Instance or Load Balanced
What is the Fargate memory limit?
30 GB
Which service compiles your source code, runs unit tests, and produces artifacts that are ready to deploy?
CodeBuild
What file includes CodeBuild configuration?
buildspec.yml
Which service allows you to provision, manage, and deploy public and private SSL/TLS certificates for use with AWS services?
Amazon Certificate Manager (ACM)
Using ACM, how can SSL be terminated?
- Terminating SSL at the Load Balancer
- Terminating SSL End-to-End
Which services can AWS Certificate Manager (ACM) be attached to?
CloudFront
API Gateway
Elastic Beanstalk (through ELB)
What is Route53?
Route53 is a DNS provider, register and manage domains, create record sets.
What are the 7 routing options using Route53?
Simple Routing - Default routing policy, multiple addresses result in a random endpoint selection
Weighted Routing - Split up traffic based on different ‘weights’ assigned (percentages)
Latency-Based Routing - Directs traffic based on region, for lowest possible latency for users.
Failover Routing - Primary site in one location, secondary data recovery site in another. (change on health check)
Geolocation Routing - Route traffic based on the geographic location of a requests origin.
Geo-proximity Routing - Route traffic based on geographic location using ‘Bias’ values (needs Route53 Traffic Flow)
Multi-value Answer Routing - Return multiple values in response to DNS queries. (using health checks. The difference between this and Simple Routing is the health checks.)
What is Route53 Traffic Flow?
Traffic Flow - visual editor, for chaining routing policies, can version policy records for easy rollback
What is AWS Alias Record?
AWS’ smart DNS record, detects changed IPs for AWS resources and adjusts automatically.
What is Route53 Resolver?
Lets you regionally route DNS queries between your VPCs and your network Hybrid Environments
What are the 3 components of Cognito?
User Pools user directory, allows users to authenticate using OAuth to IpD such as Facebook, Google, Amazon to connect to web-applications. Cognito User Pool is in itself a IpD. User Pools use JWTs for to persist authentication
Identity Pools provide temporary AWS credentials to access services eg. S3, DynamoDB. You can control access to your backend AWS resources and APIs through Amazon Cognito so users of your app get only the appropriate access. You can map users to different roles and permissions and get temporary AWS credentials for accessing AWS services such as Amazon S3, Amazon DynamoDB, Amazon API Gateway, and AWS Lambda.
Cognito Sync can sync user data and preferences across devices with one line of code (powered by SNS)
What type of queues does SQS have?
Standard Queues allow you a nearly-unlimited number of transactions per second. Guarantees that a message will be delivered AT LEAST once. More than one copy of a message could be potentially delivered out of order. Provides best-effort ordering that helps ensure a message is generally delivered in the same order that it was sent.
AWS SQS First-In-First-Out queues support multiple ordered message groups within a single queue. Limited to 300 transactions per second. SWS FIFO queues have all the same capabilities of a Standard Queue
Is SQS pull or push?
pull