mozilla / security

Repository for various tools around security
Mozilla Public License 2.0
42 stars 24 forks source link

publish_to_sns fails when region of CloudFormation stack differs from region of SNS Topic #8

Closed gene1wood closed 8 years ago

gene1wood commented 8 years ago

publish_to_sns does not designate a region to publish to and assumes the SNS Topic is in the same region that the lambda function is called in.

gene1wood commented 8 years ago

The error given when this bug was triggered is

An error occurred (InvalidParameter) when calling the Publish operations: Invalid parameter: TopicArn

Which curiously doesn't mean that the parameter TopicArn is invalid, but instead that the value of the parameter TopicArn is invalid or doesn't exist. In this case it doesn't exist because the lambda function was running in a different region than the SNS topic.