Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Expert AWS Development

You're reading from  Expert AWS Development

Product type Book
Published in Mar 2018
Publisher Packt
ISBN-13 9781788477581
Pages 408 pages
Edition 1st Edition
Languages
Author (1):
Atul Mistry Atul Mistry
Profile icon Atul Mistry
Toc

Table of Contents (16) Chapters close

Title Page
Packt Upsell
Contributors
Preface
1. AWS Tools and SDKs 2. Integrating Applications with AWS Services 3. Continuous Integration and Continuous Deployment Workflow 4. CI/CD in AWS Part 1 – CodeCommit, CodeBuild, and Testing 5. CI/CD in AWS Part 2 – CodeDeploy, CodePipeline, and CodeStar 6. User Authentication with AWS Cognito 7. Evaluating the Best Architecture 8. Traditional Web Hosting – Amazon EC2 and Elastic Load Balancing 9. Amazon EC2 Container Service 10. Amazon Lambda – AWS Serverless Architecture 1. Other Books You May Enjoy Index

Best practices for working with AWS Lambda functions


The following are the recommended best practices for using AWS Lambda:

Function code

The following are the best practices for function code:

  • You can separate your entry point or Lambda handler logic into core logic to create more unit-testable functions.
  • You can improve the performance of your function code by taking advantage of externalized configurations or dependencies for the code, so that you can retrieve the referenced code and store it locally after its initial execution. You can limit the re-initialization of objects and/or variables on every invocation. Reuse the existing connections and keep the previous connections alive, which were established during previous invocations.
  • To pass operational parameters, you can use environment variables for your functions. Let's say you want to use the Amazon S3 bucket name in your function. You can pass this value as an environment variable instead of hard-coding the bucket name.
  • You can control...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime