DevOps Articles

Curated articles, resources, tips and trends from the DevOps World.

Assign a Custom Role to a Lambda Function with AWS CDK

1 year ago towardsthecloud.com

Summary: This is a summary of an article originally published by Towards the Cloud. Read the full original article here →

In this blog post, we’ll outline how to create a custom IAM role, an AWS Lambda function, and then assign the custom role to the Lambda function in https://towardsthecloud.com/aws-cdk. Before we start building the AWS Lambda and IAM Role construct, you’re required to have done the following prerequisites before you can run AWS CDK code in TypeScript. Install AWS CDK and TypeScript NPM packages

Now that we have our custom role created, we can go ahead and create our AWS Lambda function.

With this code, we’ve now assigned our custom IAM role ‘MyCustomRole’ to the Lambda function ‘MyLambdaFunction’ in our ‘CustomRoleStack’.

Made with pure grit © 2024 Jetpack Labs Inc. All rights reserved. www.jetpacklabs.com