Hello, I'm trying to create a new AWS role policy ...
# dotnet
s
Hello, I'm trying to create a new AWS role policy but something is wrong in my json:
Copy code
let _policy =
        let args =
            Iam.RolePolicyArgs (
                Policy =
                    input
                        """
{
    "Version": "2012-10-17",
    "Statement": [{
        "Effect": "Allow",
        "Action": [
            "logs:CreateLogGroup",
            "logs:CreateLogStream",
            "logs:PutLogEvents"
        ],
        "Resource": "arn:aws:logs:*:*:*"
    }]
}
""",
                Role = io lambdaRole.Id
            )

        Iam.RolePolicy ($"{loweredProjectName}-log-policy", args)
Leads to
Copy code
aws:iam:RolePolicy (autograph-log-policy):
    error: aws:iam/rolePolicy:RolePolicy resource 'project-log-policy' has a problem: "policy" contains an invalid JSON policy. Examine values at 'RolePolicy.Policy'.
I'm not sure why. Any ideas?