Serverless Applications Flashcards
Which of the following can be triggered by an S3 event?
A.) AWS Step Function
B.) AWS Lambda Function
C.) EC2 Autoscaling Group
B.) AWS Lambda Function
Are Restful APIs stateless?
Are WebSocket APIs stateless?
Restful APIs are stateless
WebSocket APIs are stateful
How does one set up canary deployments in Lambda?
Ensure that the lambda deploys with versioning enabled, then use a lambda alias that routes a percent of traffic to the new version and the rest to the old version.
What is Spot Instance Draining in AWS
Spot Instance Draining is a feature that automatically notifies an application when a Spot Instance is about to be terminated by AWS due to price changes or capacity constraints. When the instance is marked for termination, AWS provides a two-minute warning to the application, allowing it to gracefully shut down or migrate tasks.
What are the benefits of Spot Instance Draining?
Graceful shutdown: Allows for clean termination of services, reducing data loss.
Task migration: Gives time to migrate workloads to other instances or save progress.
Improved availability: By draining the instance properly, other tasks or services can be shifted without disruption.
Cost efficiency: Maximizes the use of Spot Instances while avoiding abrupt termination.