DEV Community

Cover image for How to have AWS Lambda assume a role dynamically and get permissions on the fly
amlan
amlan

Posted on

How to have AWS Lambda assume a role dynamically and get permissions on the fly

During a recent work on one of my projects, I came across a scenario where I needed to have a AWS Lambda function assume a role dynamically and get permissions conditionally. When we create an AWS Lambda function, we always associate a single role to the function. To achieve my need I had to come up with a solution where I could have the Lambda function assume a role dynamically and get permissions which is different than the associated role. I wanted to share my experience of this method and hopefully it will help someone who is looking for a similar solution.

In this post, I will show you how to have a Lambda function assume a role dynamically and give the functions permissions which are not present in the associated role.

https://amlana21.medium.com/how-to-have-aws-lambda-assume-a-role-dynamically-and-get-permissions-on-the-fly-715e8642ab8a

Top comments (0)