Performance Efficiency Best Practices - Serverless Architectures with AWS Lambda

Performance Efficiency Best Practices

Before we dive into performance best practices, keep in mind that if your use case can be achieved asynchronously, you might not need to be concerned with the performance of your function (other than to optimize costs). You can leverage one of the event sources that will use the event InvocationType or use the pull-based invocation model. Those methods alone might allow your application logic to proceed while Lambda continues to process the event separately. If Lambda function execution time is something you want to optimize, the execution duration of your Lambda function will be primarily impacted by three things (in order of simplest to optimize): the resources you allocate in the function configuration, the language runtime you choose, and the code you write.