Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Expert AWS Development

You're reading from   Expert AWS Development Efficiently develop, deploy, and manage your enterprise apps on the Amazon Web Services platform

Arrow left icon
Product type Paperback
Published in Mar 2018
Publisher Packt
ISBN-13 9781788477581
Length 408 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Atul Mistry Atul Mistry
Author Profile Icon Atul Mistry
Atul Mistry
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. AWS Tools and SDKs FREE CHAPTER 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 11. Other Books You May Enjoy

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 €18.99/month. Cancel anytime