AWS re:Invent 2017: Serverless Architectural Patterns and Best Practices – ARC401
Another session on managing serverless and the new architectural patterns required to make it a success. The idea of to create reusable serverless patterns with an continual eye on reducing costs.
The venue was spectacular, in the Venetian Theatre which is magnificent. Shows the importance AWS is placing on serverless where most of the other sessions are in smaller rooms at the Aria.
Drew and Maitreya went through a number of patterns, giving operational and security best practices.
This was a fly by the seat of your pants session, so many AWS services were talked about, you needed an AWS dictionary to know what some are. If you are an infrastructure person who manages an OS, this was a very busy but insightful look at what is possible.
Serverless Foundations
For running your apps you can do it yourself with EC2 and even Docker, have managed services like EMR, ES, RDS etc. and then there’s services with no OS which is how they’re defining serverless, so that’s things like API Gateway, Kinesis Streams & Analytics, DynamoDB, S3, Step Functions, Config, X-Ray and Athena.
They reiterated the “never paying for idle” line and its all built for HA and DR.
You need to be aware of cold start, instantiate AWS client and database client outside the scope of the handler to take advantage of container re-use. Schedule with CloudWatch Events for pre-warming. ENUs for VPC support are attached during cold start
Lambda Best Practices
- Minimise package size to necessities
- Separate Lambda handler from core logic,
- Use environment variables to modify operational behaviours.
- Self-contain dependencies in your function package.
- Leverage “Max Memory Used” to right size your functions.
- Delete large unused functions
- Use X-Ray integration for great insights.
Recent Comments