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: Give SNS feedback access to CloudWatch #237

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

aldenquimby
Copy link

Description

  • The SNS feedback role needs both (a) allow SNS to assume the role, and (b) allow writing to CloudWatch
  • This PR adds (b)

Motivation and Context

Breaking Changes

  • No

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • I have tested and validated these changes using one or more of the provided examples/* projects
  • I have executed pre-commit run -a on my pull request

iam.tf Outdated
@@ -31,6 +47,11 @@ resource "aws_iam_role" "sns_feedback_role" {
permissions_boundary = var.sns_topic_feedback_role_permissions_boundary
assume_role_policy = data.aws_iam_policy_document.sns_feedback[0].json

inline_policy {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5 cents... that inline_policy is going to be deprecated in the future releases of Terraform AWS provider (see changelog from yesterday). I didn't research if this is affecting us here...

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting! It looks like aws_iam_role_policy is the new recommended way to do an inline policy, I'll move to that instead

Alternatively, I could switch this to use the CloudWatchLogsFullAccess managed policy? That grants logs:*, which is more than we need, so maybe not ideal

I'll also add a code comment referencing this: https://repost.aws/knowledge-center/monitor-sns-texts-cloudwatch

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@antonbabenko could you take another look please? Just updated

@aldenquimby aldenquimby changed the title fix: give SNS feedback access to CloudWatch fix: Give SNS feedback access to CloudWatch Sep 20, 2024
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.

SNS Feedback role is broken
2 participants