Skip to content

bug: simplifyBaseIAMLogGroups function is not taking others statements used in the iam role definition #5

@frangeris

Description

@frangeris

Hi there, quick issue report

The function that rewrite the Statement is discarting any other permissions being used and previously defined, only the logs actions are being attached:

"Action": [
  "logs:CreateLogStream",
  "logs:CreateLogGroup",
  "logs:PutLogEvents"
],

I have others required permissions that are not included in the final policy:

      statements:
        - Effect: Allow
          Action:
            - "s3:*"
          Resource: "*"
        - Effect: Allow
          Action:
            - "cloudwatch:*"
            - "logs:*"
          Resource: "*"
        - Effect: Allow
          Action:
            - "lambda:InvokeFunction"
          Resource: "*"
        - Effect: Allow
          Action:
            - "ssm:GetParameter"
            - "ssm:GetParametersByPath"
            - "ssm:PutParameter"
            - "ssm:DescribeParameters"
          Resource: "*"
        - Effect: Allow
          Action:
            - "events:PutEvents"
          Resource: "*"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions