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

Add source_account argument to lambda_permissions in s3_notification_module #134

Closed
AndriySidliarskiy opened this issue Feb 10, 2022 · 7 comments · Fixed by #135
Closed

Comments

@AndriySidliarskiy
Copy link

Is your request related to a new offering from AWS?

Is your request related to a problem? Please describe.

When I enable security hub one I have one critical rule which have description - "You should ensure that access to the Lambda function is restricted to authorized principals only by using least privilege Lambda resource-based policies". Solve this problem it's add this string to lambda permission, but in module you don't have an attribute [source_account] for lamba permissions.
{
"StringEquals": {
"AWS:SourceAccount": "[account_id]"
},

Describe the solution you'd like.

Add source_account attribute

Describe alternatives you've considered.

Additional context

@AlKapkone
Copy link
Contributor

+1
Please, fix it asap, would be grateful!

@antonbabenko
Copy link
Member

Good point. Pull request with added source_account is welcome. :)

@AlKapkone
Copy link
Contributor

@antonbabenko Yep, sure. I'll do it immediately.

@AlKapkone
Copy link
Contributor

@antonbabenko

git push origin source_account_lambda
ERROR: Permission to terraform-aws-modules/terraform-aws-s3-bucket.git denied to AlKapkone.
fatal: Could not read from remote repository.

@antonbabenko
Copy link
Member

You should fork this repo and submit a PR to this repo.

@AlKapkone
Copy link
Contributor

@antonbabenko Thanks, guru! For the quick response.

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants