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

Cloudformation replacement issue causes 403 #1

Closed
nfillot opened this issue Nov 9, 2020 · 2 comments
Closed

Cloudformation replacement issue causes 403 #1

nfillot opened this issue Nov 9, 2020 · 2 comments
Assignees

Comments

@nfillot
Copy link

nfillot commented Nov 9, 2020

Hello,

I tried to use the kubecost-single-account-permissions Cloudformation template but i had an issue resulting in a 403 in Kubecost due to wrong IAM permissions

Cloudformation does not replace AthenaCURBucket to the wanted target. Here is the result in the IAM policy :

        {
            "Action": [
                "s3:Get*",
                "s3:List*"
            ],
            "Resource": [
                "arn:aws:s3:::${AthenaCURBucket}*"
            ],
            "Effect": "Allow",
            "Sid": "S3ReadAccessToAwsBillingData"
        }

It works by replacing this part to the following syntax

        - Sid: S3ReadAccessToAwsBillingData
          Effect: Allow
          Action:
          - s3:Get*
          - s3:List*
          Resource:
            'Fn::Join':
              - ''
              - - 'arn:aws:s3:::'
                - !Ref AthenaCURBucket
                - "*"

Best regards

@dwbrown2
Copy link

Thanks for reporting, @nfillot! We'll start investigating now.

@AjayTripathy
Copy link
Contributor

Hi @nfillot thanks for spotting-- this should now be corrected using the !Sub function in ddb907a

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

No branches or pull requests

4 participants