aws-samples / aws-samples/aws-sam-terraform-examples
Terraform Issue in api-lambda-dynamodb-example
- 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
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