Skip to content

Instantly share code, notes, and snippets.

@hendrixroa
Created March 23, 2023 17:39
Show Gist options
  • Save hendrixroa/6505fe10cca699f177c2f7c68289f96d to your computer and use it in GitHub Desktop.
Save hendrixroa/6505fe10cca699f177c2f7c68289f96d to your computer and use it in GitHub Desktop.
AWS IAM role example for lambda functions
resource "aws_iam_role" "lambda_role" {
name = "lambda-name"
assume_role_policy = <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Action": "sts:AssumeRole",
"Principal": {
"Service": "lambda.amazonaws.com"
},
"Effect": "Allow"
}
]
}
EOF
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment