Skip to content

fix(docs): fix syntax errors in the lambda layer terraform example #1068

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 9 commits into from
38 changes: 17 additions & 21 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,36 +101,34 @@ You can include Lambda Powertools Lambda Layer using [AWS Lambda Console](https:

=== "Terraform"

```terraform hl_lines="9 38"
```terraform hl_lines="9 35"
terraform {
required_version = "~> 1.0.5"
required_version = "~> 1.1.7"
required_providers {
aws = "~> 3.50.0"
aws = "~> 4.4.0"
}
}

provider "aws" {
region = "{region}"
region = "{region}"
}

resource "aws_iam_role" "iam_for_lambda" {
name = "iam_for_lambda"

assume_role_policy = <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
"Action": "sts:AssumeRole",
"Principal": {
"Service": "lambda.amazonaws.com"
},
"Effect": "Allow"
}
]
}
EOF
}
assume_role_policy = jsonencode({
Version = "2012-10-17",
Statement = [
{
Action = "sts:AssumeRole",
Principal = {
Service = "lambda.amazonaws.com"
},
Effect = "Allow"
}
]
})
}

resource "aws_lambda_function" "test_lambda" {
filename = "lambda_function_payload.zip"
Expand All @@ -142,8 +140,6 @@ You can include Lambda Powertools Lambda Layer using [AWS Lambda Console](https:

source_code_hash = filebase64sha256("lambda_function_payload.zip")
}


```

=== "Amplify"
Expand Down