AWS Serverless at Qest
Why AWS?
- Customer-centric philosophy
- Lead in cloud & serverless
- Tooling & OSS
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1176462/images/6765660/AWS_Overview_1_.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1176462/images/6765853/AWS_Overview_2_.png)
Serverless
- no servers to manage
- implicitly highly available & scalable
-
pay-per-request pricing model
-
logging & monitoring built-in
Pay-per-use pricing +
High-level tooling +
High-level services = Cloud-native Serverless
- Multiple environments / versions no longer cost more
- sandbox environment for each developer
- Velocity - focus on solutions, not server management
- production-grade prototypes
- Custom tooling & services on top of existing ones
- cloud as a framework
Basic serverless application components
Messaging
Compute
Storage
Identity
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1176462/images/6766093/AWS-Lambda_light-bg_4x.png)
![S3](https://s3.amazonaws.com/media-p.slid.es/uploads/1176462/images/6766099/Amazon-Simple-Storage-Service-S3_light-bg_4x.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1176462/images/6766101/Amazon-DynamoDB_light-bg_4x.png)
S3
DynamoDB
Lambda
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1176462/images/6766112/Amazon-Simple-Queue-Service-SQS_4x.png)
SQS
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1176462/images/6766114/Amazon-Simple-Notification-Service-SNS_4x.png)
SNS
Cognito
Integration
API Gateway
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1176462/images/6766147/Amazon-CloudFront_4x.png)
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1176462/images/6766148/Amazon-API-Gateway_4x.png)
Cloudfront
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1176462/images/6766252/Amazon-Cognito_4x.png)
Cognito UserPool
- Secure identity provider
- Deep integration with other services
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1176462/images/6766263/amazon-cognito-sign-in-confirm-user.png)
Cognito IdentityPool
Enables user access to AWS resources for configured identity providers
AWS Lambda
- Hosted piece of code, that handles events
- limited time of execution (15min)
- Pricing in 100ms increments
- based on configured memory
- Many event sources
- Integration-specific return values
module.exports = async (event) => {
return {
statusCode: 200,
body: "success",
};
};
DynamoDB
- Infinitely scalable key-value database
- at consistent latency
- ideal for customer-facing scenarios
- Pay-per-request + storage
- Many weird quirks and specifics
- read docs first
-
DynamoDB Streams
- serves as an integration point
SNS / SQS
- SQS - fully-featured queue with unlimited throughput
- buffering
- offloading work
- SNS - notification system with pub/sub semantics
- organized into Topics
- integration
Serverless application design
Organizing application into contexts - custom sources of events.
Microservice Service Context
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1176462/images/6766535/Screenshot_2019-11-13_00-38-26.png)
Case Study
Abaku
Integrating Service Contexts
- EventBridge
- Decoupling event sources / targets
- AWS Step Functions
- workflow orchestration
EventBridge
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1176462/images/6766343/pasted-from-clipboard.png)
Step Functions
![](https://s3.amazonaws.com/media-p.slid.es/uploads/1176462/images/6766361/Screenshot_2019-11-13_00-17-00.png)
- Business use cases that cross contexts
- need to know the state even in case of a failure
- Pay for state transitions
- and underlying resources
Qest Serverless Workshop
By Vít Habada
Qest Serverless Workshop
- 549