“ I have checked the documents of AWS to delete the lambda function versions in one run instead of manually deleting each version of a function. Got a solution to delete the lambda versions using lambda function by code run. In terms of cost, the solution is cheaper and secure.”
Lambda is a compute service that lets you run code without provisioning or managing servers. Lambda runs your code on a high-availability compute infrastructure and performs all of the administration of the compute resources, including server and operating system maintenance, capacity provisioning and automatic scaling, code monitoring and logging. With Lambda, you can run code for virtually any type of application or backend service.
In this post, you will experience the lambda versions deletion using lambda function. Here I have created a lambda function with versions and IAM role with required permissions.
Prerequisites
You’ll need an AWS Lambda for this post. Getting started with aws Lambda provides instructions on how to create a lambda function. For this blog, I assume that I have a lambda function and IAM role created.
Architecture Overview
The architecture diagram shows the overall deployment architecture with data flow, lambda and iam role.
Solution overview
The blog post consists of the following phases:
- Create of Lambda Function for Deleting the Lambda Version
- Testing of Lambda Version Deletion
I have a lambda function with versions and IAM role with required permission created as below →
Phase 1: Create of Lambda Function for Deleting the Lambda Version
- Open the console for AWS lambda and create a lambda function as delete-lambda-version with function code.
Phase 2: Testing of Lambda Version Deletion
Clean-up
Delete of IAM, lambda and cloudwatch log group.
Pricing
I review the pricing and estimated cost of this example.
Cost of Cloudwatch = $0.0
Cost of Lambda = $0.0
Total Cost = $(0.0 + 0.0) = $0.0
Summary
In this post, I showed “explore of lambda versions deletion using lambda function”.
For more details on AWS Lambda, Checkout Get started AWS Lambda, open the AWS Lambda console. To learn more, read the AWS Lambda documentation.
Thanks for reading!
Connect with me: Linkedin
Top comments (1)
How we can access to the example code? Great post btw