Terraform AWS role policy fails when adding permissions
问题 I need to create some role policy for AWS using Terraform, the basic role works fine, but when I add S3 and logs, I get a malformed error: aws_iam_role.lambda_exec_role_s3: Error creating IAM Role lambda_exec_role_s3: MalformedPolicyDocument: Has prohibited field Resource status code: 400 This is the role policy that is failing: assume_role_policy = <<EOF { "Version": "2012-10-17", "Statement": [ { "Action": "sts:AssumeRole", "Principal": { "Service": "lambda.amazonaws.com" }, "Effect":