Serverless Flashcards
Serverless
*No infrastructure to provision or manage
*No servers to provision, operate, or patch
*Scales automatically by unit of consumption, rather than by server unit
*Pay-for-value billing model (pay for the unit, rather than by server unit)
*Built-in availability and fault tolerance
*No need to architect for availability because it is built into the service
AWS Serverless Portfolio
1.Lambda
2. Fargate
- API Gateway
- S3
- DynamoDB
- Aurora Serverless
- Congnito
- SNS
- SQS
- Step Functions
- Kinesis
- Athena
API Gateway
Create an entry point for your applications.
*Process up to hundreds of thousands of concurrent API calls.
*Choose internet-facing or internal only.
Types of tasks API gateway handles
traffic management, authorization and access control,
monitoring, and API version management.
What are things you can do with API Gateway
With
API Gateway, you can do the following:
*Host and use multiple versions and stages of your APIs.
*Create and distribute API keys to developers.
*Use Signature Version 4 (SigV4) to authorize access to APIs.
*Use RESTful or WebSocket APIs.
Features of API Gateway
Creates a unified API frontend for multiple
microservices
Provides distributed denial of service (DDoS)
protection and throttling for your backend
Authenticates and authorizes requests to a backend
Throttles, meters, and monetizes API usage by
third-party developers
What detailed metrics can API Gateway send to CloudWatch
What other type of logging can you do with API Gateway
*Number of API calls
*Latency
*Integration latency
*HTTP 400 and 500 errors
You can also activate access logging to log who has accessed your API and how they accessed it.
Amazon SQS
Fully managed message queueing service
Stores messages until they are processed and deleted
Acts as a buffer between senders and receivers
What makes SQS a managed service
requires no administrative overhead
massive scale, processing billions of messages per day
stores all message queues and messages within a single, highly available AWS Region with multiple redundant Availability Zones
Unique access control features of SQS
Developers can securely share SQS queues anonymously or with specific AWS accounts. You can also restrict queue sharing by IP address and time of day.
Streaming Single Instruction Multiple Data (SIMD) Extensions (SSE)
Streaming Single Instruction Multiple Data (SIMD) Extensions (SSE) protects the contents of messages in SQS queues using keys managed in AWS KMS.
SIMD Extensions encrypts messages as soon as Amazon SQS receives them. The messages are stored in encrypted form, and Amazon SQS decrypts messages only when they are sent to an authorized consumer
SQS queue provides the following benefits
*Loose coupling – With Amazon SQS, you can decouple preprocessing steps from compute steps and postprocessing steps. Using asynchronous processing isolates the producer logic into its own component separate from the consumer logic.
*Failure tolerance – In the event of an application exception or transaction failure, the processing can be retried. Once the maximum number of retries is reached, SQS can redirect the message to dead-letter queue .
*Absorbs spikes – An Amazon SQS queue makes the system more resilient. The queue acts as a buffer to
absorb spikes in traffic. This gives your application additional time to complete scale-out actions. It is also cost effective because you don’t need to provision as much idle compute to absorb spikes.
dead-letter queue
dead-letter queue where you can reprocess or debug it later
messages that cannot be processed by the consumer queue
SQS use cases
*Work queues – Decouple components of a distributed application that might not all process the same amount of work simultaneously. You can choose a standard queue or a first-in-first-out (FIFO) queue depending on the requirements of your application.
*Buffering and batch operations – Add scalability and reliability to your architecture and smooth out
temporary volume spikes without losing messages or increasing latency.
*Request offloading – Move slow operations off of interactive request paths by enqueueing the request.
*Auto scaling instances – Use SQS queues to help determine the load on an application. When combined with auto scaling, you can scale the number of Amazon EC2 instances in or out, depending on the volume of traffic.
Amazon SQS offers two types of message queues.
Standard queues
FIFO queues