Description
Description
Hi, I was playing around with ElastiCache notifications to a SNS topic created with this module, but they were not arriving as expected. However, with a SNS topic created by hand with the default policy worked. After a bit of digging, I found out that the default policy provided by SNS still has the AWS:SourceOwner
key.
According to the AWS Documentation, the key is deprecated but some services are still using it and not the new AWS:SourceAccount
key.
Rolling back the module version worked.
Versions
6.1.3
Reproduction Code
- Define a SNS topic with just the name and deploy it
- Link the topic to an ElastiCache replication group
- Create a log destination for the notification or a topic subscription
- Trigger an ElastiCache event, like test-failover
Expected behavior
The events should be sent to the log and/or the subscribers. Should be that way for all services that publish to SNS.
Actual behavior
The events are not being sent to the topic due to mismatch between the condition keys with the default policy. The AWS-provided default policy works, however, but it won't work for new services that use AWS:SourceAccount
.
Additional notes
I suggest creating a new default policy with two statements, one with AWS:SourceOwner, and the other one with AWS:SourceAccount to accomodate for both situations.