aws-samples / aws-samples/aws-sam-terraform-examples

Terraform Issue in api-lambda-dynamodb-example

Open
#16 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
HCL
Stars
57
Forks
14
PR merge metrics
No merged PRs in 30d

Description

```
api-lambda-dynamodb-example % terraform plan -out tfplan

│ Error: "assume_role_policy" contains an invalid JSON policy: leading space characters are not allowed

│ with aws_iam_role.iam_for_lambda,
│ on main.tf line 67, in resource "aws_iam_role" "iam_for_lambda":
│ 67: assume_role_policy = <

Contributor guide

Open the contributing guide

Research direction

Start in main.tf at the aws_iam_role.iam_for_lambda resource around line 67 and reproduce the reported failure with terraform plan -out tfplan. Correct the assume_role_policy heredoc formatting so Terraform accepts the JSON policy, then rerun the plan to confirm the error is gone.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, terraform
Domain
cloud, infrastructure
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.