GeoJSON
Spring
Hibernate
Liquid
Karma
Deploy
SASS
REST
Upgrade
Boot
Spring
Consume
Visualize
React
Angular

AWS had a little lambda

AWS Lambda

I recently had the opportunity to develop a serverless application with the use of AWS Lambda and API Gateway. It was my first introduction to the technology. My coworker suggested the solution as a way to keep cost down for for hosting a relatively simple  REST API needed for multiple other services in our main application. We started with a Spring Boot Java application connected to DynamoDB in a docker container. Then we created a Lambda file to define the API endpoints. A Lambda file in this case is was a single Java class with methods for each endpoint which is basically the same thing as a traditional Spring Boot Controller. The Lambda file called an additional service file to do the core logic which also depended on a CRUD Repository file that integrates to DynamoDB. This Lambda project is deployed to AWS via a serverless.yml file that defines the paths and parameters for the Lambda file. The challenges I faced were mostly learning to use AWS API Gateway and serverless.yml. We used the original spring controller to debug during development. Once we got it working it seemed rather simple though. 

AWS Lambda is a serverless computing service provided by Amazon Web Services (AWS) that enables you to run code in response to events without the need to provision or manage servers. With AWS Lambda, you can build and deploy applications using a "pay-as-you-go" model, where you only pay for the compute time that your code actually consumes.

Key features and concepts of AWS Lambda include:

Serverless Architecture: With AWS Lambda, you don't need to worry about server provisioning, scaling, or maintenance. AWS takes care of the underlying infrastructure, allowing you to focus on writing and deploying code.

Event-Driven Execution: AWS Lambda functions are triggered by events from various AWS services or custom sources. These events can include changes in data, HTTP requests, database updates, file uploads, and more.

Supported Languages: AWS Lambda supports multiple programming languages, including Node.js, Python, Java, Ruby, Go, and .NET Core, allowing you to write code in your preferred language.

Auto Scaling: AWS Lambda automatically scales your functions in response to incoming events. It allocates the required resources based on demand and automatically manages the execution environment.

Granular Billing: With AWS Lambda, you are billed based on the number of requests and the duration of code execution. This granular billing model can lead to cost savings, as you only pay for the actual compute resources used.

Stateless Functions: AWS Lambda functions are designed to be stateless, meaning they don't retain data between invocations. Any required state or data should be stored externally, such as in AWS databases or storage services.

Integration with Other AWS Services: AWS Lambda can easily integrate with other AWS services, such as Amazon S3, Amazon DynamoDB, Amazon SNS, and more. This makes it a powerful tool for building event-driven applications and workflows.

Versioning and Deployment: AWS Lambda allows you to manage different versions of your functions and deploy updates without impacting running functions. This helps ensure smooth transitions and backward compatibility.

script