This document provides an overview of Srushith Repakula's experiences architecting and implementing serverless platforms. It discusses various serverless services like AWS Lambda, API Gateway, DynamoDB, SNS, SQS, Step Functions and EventBridge. It also summarizes design patterns for building event-driven applications on serverless including hub and spoke, static event flow and filtered event flow models. Finally, it outlines best practices for serverless development and potential challenges.
13. Best Practices & Things to Remember
● There can be no public access - for the good!
● The maximum limit for expiry of API key is 365 days
● Quotas and limits
● Security best practices - using the correct authorization mode
based on the access patterns
● WAF in front of AppSync
● Turn off introspection - Schema not discoverable
20. Best Practices and Things to Remember!
● Limitation on the number of connections: 1000 per second and 500 concurrently
● Understand Scaling Point and enable “Force Scaling” if needed
● Data API has a default timeout of 45 seconds. This can be increased
● Each transaction should run within 3 minutes
● Data size limitations - 64 KB per row and 1 MiB overall. Always account for pagination to
ensure the query doesn’t fail
22. ● Multi AZ support
● Read Replicas
● Much improved & granular
scaling
● Global databases
● Compatible with RDS
Proxy
What does Aurora Serverless V2 offer?
@SrushithR
23. ● Missing Data API support
● Inability to scale down to 0
● Costlier in comparison
So, does V2 solve everything?
@SrushithR
24.
25.
26. Amazon EventBridge is a
serverless event bus that
makes it easier to build
event-driven applications
27. Design Patterns - Hub & Spoke Model
User Management
Checkout
Event &
Registrations
App Data
Payments
@SrushithR
28. Design Patterns - Hub & Spoke Model
User Management
Checkout
Event &
Registrations
App Data
Payments
@SrushithR
33. Best Practices and Things to Remember!
● Configure events (Matched, Part of matched, Constant, Transformed) based on the
downstream consumers
● Filter out data that is passed over to the consumers - especially payment or PII data
● Standardise event structuring for better filtering and routing - “metadata” and “data”
● At least once delivery with a 24 hour retry - build for idempotency
● Use EventBridge for microservices communications and SNS for internal service
communications
● Look at functionless integrations wherever possible
@SrushithR
34. AWS Step Functions is a
serverless orchestration service
that lets you combine AWS
Lambda functions and other AWS
services to build business-critical
applications
@SrushithR
37. Best Practices and Points to Remember!
● Choosing between standard and express workflows
● Leverage S3 instead of passing large payloads
● Use timeouts to avoid stuck executions
● Move out the retry, time wait, conditional execution from the application layer to step
function configuration
● Use task tokens to await for responses from 3rd party APIs
@SrushithR
38. Challenges & Lessons Learnt
● Lot of context in the architecture - a boon or a bane?
● Loosely coupled, difficult to get started and debug
● Keep an eye out for silent failures, especially in asynchronous invocations - use Lambda
Destinations
● Lambda functions can scale, but can your downstream services?
● DDoS* can happen, and you might not even know!
@SrushithR
41. Image and Icon Credits
1. API cartoon - https://auth0.com/blog/what-is-an-api-how-apis-work-for-non-developers/
2. Rest vs GraphQL - https://twitter.com/Rapid_API/status/1517497279145459712/photo/1
3. Icons made by <a href="https://www.flaticon.com/free-icon/flow_1160137" title="Kiranshastry">Kiranshastry</a> from <a
href="https://www.flaticon.com/" title="Flaticon"> www.flaticon.com</a>
4. <a href='https://www.freepik.com/vectors/music'>Music vector created by stories - www.freepik.com</a>
5. Icons made by <a href="https://www.flaticon.com/authors/smashicons" title="Smashicons">Smashicons</a> from <a
href="https://www.flaticon.com/" title="Flaticon"> www.flaticon.com</a>
6. Icons made by <a href="https://creativemarket.com/eucalyp" title="Eucalyp">Eucalyp</a> from <a href="https://www.flaticon.com/"
title="Flaticon"> www.flaticon.com</a>
7. Icons made by <a href="https://www.flaticon.com/free-icon/rocket_788195" title="prettycons">prettycons</a> from <a
href="https://www.flaticon.com/" title="Flaticon"> www.flaticon.com</a>
8. Icons made by <a href="http://www.freepik.com/" title="Freepik">Freepik</a> from <a href="https://www.flaticon.com/" title="Flaticon">
www.flaticon.com</a>
9. Icons made by <a href="https://www.flaticon.com/authors/becris" title="Becris">Becris</a> from <a href="https://www.flaticon.com/"
title="Flaticon"> www.flaticon.com</a>
10. Icons made by <a href="https://www.flaticon.com/authors/freepik" title="Freepik">Freepik</a> from <a href="https://www.flaticon.com/"
title="Flaticon"> www.flaticon.com</a>
11. Icons made by <a href="https://www.flaticon.com/authors/ddara" title="dDara">dDara</a> from <a href="https://www.flaticon.com/"
title="Flaticon"> www.flaticon.com</a>
12. Icons made by <a href="https://www.flaticon.com/authors/geotatah" title="geotatah">geotatah</a> from <a
href="https://www.flaticon.com/" title="Flaticon"> www.flaticon.com</a>
13. DB security - <a href="https://www.flaticon.com/free-icons/server" title="server icons">Server icons created by Freepik - Flaticon</a>
14. Cold start - <a href="https://www.flaticon.com/free-icons/temperature" title="temperature icons">Temperature icons created by
Smashicons - Flaticon</a>
15. DB connectivity - <a href="https://www.flaticon.com/free-icons/network" title="network icons">Network icons created by pmicon -
Flaticon</a>
42. Image and Icon Credits
1. Webhook - <a href="https://www.flaticon.com/free-icons/webhook" title="webhook icons">Webhook icons created by Freepik -
Flaticon</a>
2. Rest API - <a href="https://www.flaticon.com/free-icons/api" title="api icons">Api icons created by berkahicon - Flaticon</a>
3. User - <a href="https://www.flaticon.com/free-icons/user" title="user icons">User icons created by Freepik - Flaticon</a>