DEV Community

GargeeBhatnagar for AWS Community Builders

Posted on

Traverse the Lambda Function URL Feature Using CloudFormation

“ I have checked the documents of AWS to traverse the lambda function url feature using cloudformation. I have checked the feature of the lambda function to enable the function url using cloudformation. The Pricing is based on scenario usage for lambda and cloudwatch log group.”

AWS CloudFormation is a service that helps you model and set up your AWS resources so that you can speed less time managing those resources and more time focusing on your applications that run in AWS. You create a template that describes all the AWS resources that you want (like Amazon EC2 instances or Amazon RDS DB instances), and CloudFormation takes care of provisioning and configuring those resources for you.

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 “traverse the lambda function url feature using cloudformation”. Here I have created a lambda function and the function url using cloudformation with required permission.

Architecture Overview

Image description
The architecture diagram shows the overall deployment architecture with data flow, iam role, cloud formation, lambda.

Solution overview

The blog post consists of the following phases:

  1. Create of IAM Role and Stack for Lambda Function URL
  2. Testing of Lambda Function URL

Phase 1: Create of IAM Role and Stack for Lambda Function URL

  1. Open the IAM Console and create a role for lambda service with AWS lambda basic execute policy. Create a cloudformation stack for lambda function with lambda function URL. Also add permission on lambda function for function URL.

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Image description

Phase 2: Testing of Lambda Function URL

Image description

Image description

Image description

Image description

Clean-up

Delete IAM Role, CloudFormation 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

Summary

In this post, I showed “how to traverse the lambda function url feature using cloudformation”.

For more details on AWS CloudFormation, Checkout Get started AWS CloudFormation, open the AWS CloudFormation console. To learn more, read the AWS CloudFormation documentation.

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
Image description

Top comments (0)