General Review Flashcards
What is Cloudtrail?
AWS Lambda is integrated with AWS CloudTrail, a service that provides a record of actions taken by a user, role, or an AWS service in AWS Lambda. … If you create a trail, you can enable continuous delivery of CloudTrail events to an Amazon S3 bucket, including events for AWS Lambda.
Cloudwatch vs CloudTrail
CloudWatch Logs reports on application logs, while CloudTrail Logs provide you specific information on what occurred in your AWS account. CloudWatch Events is a near real time stream of system events describing changes to your AWS resources. CloudTrail focuses more on AWS API calls made in your AWS account.
Cloudwatch Metrics
Start at 1 minute. Use high-resolution to go higher.
1 minute for detailed monitoring.
5 minutes for standard monitoring.
Can be on-premisis.
For application-specific events you need a custom metric.
The minumum for custom is 1 minute.
What are serverless technologies?
Serverless applications don’t require provisioning, maintaining, and administering servers for backend components such as compute, databases, storage, stream processing, message queueing, and more. You also no longer need to worry about ensuring application fault tolerance and availability. Instead, AWS handles all of these capabilities for you. Lamda and @edge Fargate S3 EFS Dynamo Aurora - database will automatically start up, shut down, and scale RDS Proxy API Proxy SNS/SQS/STEP/Kinesis/Athena/Dev Tooling.
What is Step
AWS Step Functions makes it easy to coordinate the components of distributed applications and microservices using visual workflows. Building applications from individual components that each perform a discrete function lets you scale and change applications quickly. Step Functions is a reliable way to coordinate components and step through the functions of your application.
Secrets Manager vs Parameter Store
https://scalesec.com/blog/a-comparison-of-secrets-managers-for-aws/
SQS Delay Queues
0-900 seconds
Postpone delivery of new messages to a queue. For FIFO only, takes place immediately on messages in queue.
Best pracotsce for Large SQS Messages using S3
- Use S3
- Use Extended client library for Java
- SDK for Java
- Specifiy that messages are always stored on S3 or > 256.
- Send message referencing object on S3
- Delete message from S3
- Ge mesage object from S3
Paginations
–page-size
also
–max-items
Kinesis
Client library runs on consumer instances
They track the number of shards on stream
Discover new shards
WIth KCL, number of instances should not exceed shards
You don’t need more than one per shard. Only consider it if CPU utilization is high.
Lamda Limits
Lamda limit is a safetry feature: “Reserved Concurrency” 1,000 per second
429 HTTP Status if rejected - Call AWS Support
Upload package size 50mb max. 250 unzipped.
Lamda and VPC Resources
- Allow function to connection to private subnet
- It needs VPC Configuration
- Private subnet
- Security Group
- Use vpc-config param to add
x-ray
You need both the daemon and the SDK
Install on EC2 instance or on-premisis server or on EC32 within beanstalk
I fusing ECS, install alongside
Annotations add indexed key-value pairs
Dynomo, Lamda, API Gateway
Sampling: 1 request per seconds, 5% or subsequent.
You can use the AWS Elastic Beanstalk console or a configuration file to run the AWS X-Ray daemon on the instances in your environment. X-Ray is an AWS service that gathers data about the requests that your application serves, and uses it to construct a service map that you can use to identify issues with your application and opportunities for optimization.
Beanstalk and Docker
Single Container
Multiple - Use EBS beanstalk to build EBS cluster and deploy multiple containers to each instance
UPload a zip file and beanstalk will do the rest.
Code can be updated from local machine or public S3 bucket. You can also use CodeCommit, but must use the beanstalk CLI.