Skip to content
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

Fix AWS::Serverless::{Function,StateMachine}.IAMPolicyDocument schemas #433

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tmclaugh
Copy link

A Statement can have an object or an array of objects.

Got tired of VS Code telling me my Policy statements were malformed when in fact they were not. Tested a policy statement string and that did not work. Though I might have just forgotten some needed keys. Can't say for certain.

A Statement can have an object or an array of objects.
@rubenfonseca
Copy link
Contributor

Hi @tmclaugh, can you please send me a concrete example of a statement that should work, but that isn't correctly validated by the schema?

@tmclaugh
Copy link
Author

Here is one:

      Policies:
        - Statement:
          - Effect: Allow
            Action:
              - "dynamodb:PutItem"
              - "dynamodb:GetItem"
              - "dynamodb:UpdateItem"
              - "dynamodb:UpdateItem"
            Resource:
              - !GetAtt DynamoDBTable.Arn
          - Effect: Allow
            Action:
              - logs:CreateLogDelivery
              - logs:GetLogDelivery
              - logs:UpdateLogDelivery
              - logs:DeleteLogDelivery
              - logs:ListLogDeliveries
              - logs:PutResourcePolicy
              - logs:DescribeResourcePolicies
              - logs:DescribeLogGroups
            Resource: '*'
          - Effect: Allow
            Action:
              - logs:CreateLogStream
              - logs:DescribeLogStream
              - logs:DescribeLogGroups
              - logs:PutLogEvents
            Resource:
              - !GetAtt DdbOpsLogGroup.Arn

@rubenfonseca
Copy link
Contributor

Unfortunately, this is not easy to fix (see my PR where testes are failing). I will need some extra time to think about how to integrate this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants