Overview

AWS Lambda is helping enterprises to build a serverless architecture or migrate their existing application portfolio to the cloud-native serverless platform.This framework will help them get cost scalability, security, and application availability benefits. While embarking on this journey to the cloud, enterprises are also looking at architecture designs that can deliver faster to remain competitive in the market. The AWS Lambda-based architecture allows enterprises to provide business features at scale. This architecture is gaining popularity to implement modern application development use cases because of a wide range of benefits.
Though AWS Lambda-based development offers many benefits, enterprises should follow the well-architected principle, best practices, and serverless architecture patterns while designing the architecture for modernizing the application. LTI has vast experience in helping customers build AWS Lambda solutions to implement use cases for the modern Web application backend, digital media supply chain implementation, IIOT implementations, MES application modernization, and Hadoop migration to AWS re-platforming legacy integration platforms. A few of the best practices and key learnings are highlighted below:

The Key Learnings and Best Practices

AWS Lambda layer is one of the ways to share code and data between functions within and across different AWS accounts. A great candidate would be a logging package that your team must standardize. Another great example is the AWS SDK. It also helps to reduce the cold start latency by reducing the size of uploaded deployment archives and making the deployment of your code faster.
Lambda function needs you to package all your dependencies before uploading them to the procession. The bigger the deployment package, the slower your function initializes, i.e., it will introduce a latency called cold start. Remove all the unused code, documentation, and dependencies to smaller packages. Also, use Lambda layers if you intend to reuse code in more than one function, which helps reduce the overall function initialization time.
When you invoke a Lambda function, the invocation is routed to an execution environment where the process loads the application code and creates the runtime and associated dependencies. Depending on the deployment package’s size and the execution environment’s initialization time, this can introduce some latency to the initial invocations routed to the new execution environment. This latency is referred to as a “cold start.” The cold start is not a problem for most applications, but latency may not be acceptable for some applications. When you enable ‘Provisioned Concurrency’ for your function, the Lambda service will initialize the configured number of execution environments so they can be ready to respond to incoming concurrent requests.
The Lambda function allocates compute power in proportion to the memory given to the process, i.e., the more memory you distribute, the more CPU you get. This means you can get over-provision memory to run your functions faster and reduce execution costs. It is best to benchmark your use case to determine the sweet spot between memory and compute power. Your execution can be compared based on more memory (run faster) as against low memory (run slower).
The main drawback of the Lambda function is 15 minutes maximum execution time, which can be a significant issue when you want to iterate over an unbounded set of resources. The step function can help you orchestrate invocations of Lambda functions and maintain the state throughout the lifetime of an execution.
You can use environment variables to customize function behavior in different environments, and they go together with your application code. You pass sensitive data such as DB passwords as an environment variable, and you do not want to expose this to everyone who has access to the code. It is generally best to encrypt such sensitive information using AWS KMS before deploying your environment.
AWS Lambda versioning helps you manage between different environments, frequent code updates, configurations, and environment variables. A Lambda version is an immutable entity which means once the Lambda version is published, it cannot be changed. The main issue with this version is that we must change the client code or settings every time to a new version we publish, and here comes the alias in the picture, which helps to abstract away this frequent update on the client-side.An alias can be thought of pointer to a specific Lambda version. Now we update its function frequently and publish new VA perversions; the client-side is aware of this change and always points to a particular alias that says “dev” or “prod.” This helps in quicker iterative development and testing of the Lambda function.
One of the benefits of using the Lambda function is that it scales quickly against concurrent Lambda invocations. It can quickly scale to hundreds and thousands of invocations. Reserved concurrency limits the number of simultaneous invocations of a single Lambda function before it starts throttling the request. This scaling is beneficial, but sometimes this can create problems too. For example, a single Lambda function can hit that account’s concurrent limit, which will generate issues for other critical Lambda functions running on the same account. To avoid this problem, always consider setting an optimal value to the reserved concurrency for each Lambda function.
As the Lambda function is highly scalable, any part that connects to the database can quickly scale to thousands of concurrent invocations. These Lambda functions will try to set up its global variables and database connections. But the database may not allow such a high number of simultaneous connections, and some of the functions mail fail due to this issue. One way to handle such a sad scenario is to use Amazon RDS proxy, which allows your application to pool and share database connections to improve its ability to scale.
Low code platform such as AWS Amplify allows enterprises to modernize custom build app using AWS Lambda as a serverless backend. This platform provides easy-to-use templates for the Front end and AWS Lambda backend development and easy integration with the AWS Services such as API Gateway, DynamoDB, Cognito, AppSync, and other AWS Serverless platforms. This tool also offers automated CI/CD for the continuous integration of Lambda functions.

Our Experience

Application migration from monolith to microservices architecture

LTI has helped customers move their legacy monolith application running on-prem to entirely serverless architecture, using AWS Lambda, which reduced the customer’s overall maintenance overhead and saved costs. Each monolith feature was implemented by an independent Lambda function running behind API gateways. This also helped customers quickly deploy, update, and test the application could focus on business implementation rather than managing infrastructure.
Migrating on-prem Oracle database to AWS DynamoDB using AWS Lambda

LTI has helped customers build automated data migration from on-premises databases to databases on AWS such as DynamoDB. The solution orchestrates the whole flow using AWS Lambda and SQS to mix the entire load and on-premise Oracle database to AWS, DynamoDB, including the data transformation from SQL to No-SQL format. This highly scalable solution moves thousands of rows daily to the target databases.
Migrating legacy integration platform using AWS Lambda

LTI has helped customers transform legacy integration platforms into serverless-based integration solutions. This solution has allowed customers to lose expensive licensee of legacy integration platforms and move towards a cost-optimized and scalable serverless architecture for integrations with the downstream systems.

LTI’s Service Offerings for Lambda


1. Consulting
Our consulting service focuses on tool-based and domain-led application assessment using the LTI infinity platform and design thinking approach. This assessment helps build target cloud architecture using Well-Architected Framework and serverless architecture patterns addressing business needs.

2. Application modernization
LTI has expertise in transforming customer-facing web applications and re-platforming legacy integration platforms into cloud-native or serverless PaaS-based architecture. Application modernization journey to AWS serverless PaaS is accelerated by 25-30% with the LTI’s reusable Lambda layers, best practices based on Well Architect Framework, observability solution, and Infinity DevOps platform for end-to-end continuous integration and delivery.

3. Modernizing data pipeline and data lakes
Our data engineering service line helps customers modernize data pipeline/ETL and data lakes using AWS Data services and AWS Lambda. This service line helps to migrate commercial databases to serverless cloud databases such as Arora and DynamoDB using Lambda-based ETL or AWS DMS and SCT tools.

4. Low code development
Low code development offering is responsible for modern application development using AWS amplify and LTI Infinity Studio. Amplify Studio helps developers implement AWS Lambda-based backend faster, adhering to industry best practices.

5. Mainframe modernization to cloud-native or serverless PaaS
LTI focuses on assessing Mainframe Application Workload for domain-led transformation, auto-code conversion using partner solutions, and API-fiction of business-critical functionality.

6. LTI’s DevOps engineering
LTI DevOps engineering services help define quality gates during AWS Lambda API development to ensure all quality requirements are met, and all features are delivered at scale.

LTI’s Accelerators

Infinity AppLens App assessment framework for understanding the health of the legacy applications. Technology insights gathered through this assessment helps to define the target AWS Lambda-based architecture.
Architecture blueprints and best practices Serverless architecture blueprints using AWS Lambda for modern application development cases.
Infinity DevOps Self-service DevSecOps platform for automated enablement and persona-based governance for AWS Lambda-based application landscape.
Infinity Ensure A self-service SaaS platform that provides FinOps governance on AWS serverless services viz AWS Lambda, API Gateway, RDS, DynamoDB, etc.
Observability platform for serverless LTI’s observability solutions help quickly navigate the root cause of the problem, which helps reduce application development using Lambda functions.
AWS Lambda is one of the most popular serverless compute and event-driven services. It fits various use cases from a batch job, web application, AWS service integration, and much more. Don’t forget to optimize Lambda performance to reduce the overall project management costs significantly.
With the LTI Infinity platform, architecture blueprints, and best practices, LTI has helped customers across banking, insurance, media, manufacturing, utility to modernize legacy application portfolios using AWS Serverless Platform services.