Skip to content

Conversation

@njlynch
Copy link
Contributor

@njlynch njlynch commented Apr 29, 2020

Commit Message

feat(sns-subscriptions) cross-region support for Lambda functions (#7679)

fixes #5734

End Commit Message


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

njlynch added 2 commits April 29, 2020 15:25
Extend the existing cross-region topic subscription for SQS to apply to Lambda.

fixes #5734
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 20c02f1
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 26714b8
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@nija-at nija-at changed the title feat(sns-subscriptions): extend cross-region support to Lambda functions feat(sns-subscriptions): cross-region support for Lambda functions Apr 30, 2020
Copy link
Contributor

@nija-at nija-at left a comment

Choose a reason for hiding this comment

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

Thanks for submitting this PR!

Code itself looks good to me.
Did you happen to check if this actually works, as in CF doesn't complain at the time of deployment, and that a message on a topic in one region actually invokes the function in another?

@njlynch
Copy link
Contributor Author

njlynch commented Apr 30, 2020

Did you happen to check if this actually works, as in CF doesn't complain at the time of deployment, and that a message on a topic in one region actually invokes the function in another?

Yes. I created a SNS topic in eu-west-2 (by hand), built a CDK app with a Lambda function that subscribed to the topic, and deployed it to eu-west-1. Verified it broke prior to the fix, and worked afterward (both deploying correctly, and being able to trigger the Lambda via the topic).

@iph
Copy link
Contributor

iph commented Apr 30, 2020

What service principle is used when adding permissions for sns from cloudformation?

This may be a future issue to add but cross-region in newer regions (ap-east-1, me-south-1, af-south-1, eu-south-1, etc.), I'm unsure if the overarching service principle (e.g. sns.amazonaws.com) works and I think you need to use regionalized SP. This isn't a problem in same-region so it wouldn't need to be addressed.

@mergify
Copy link
Contributor

mergify bot commented Apr 30, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 89cd610
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented Apr 30, 2020

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 31d60a9 into aws:master Apr 30, 2020
@njlynch njlynch deleted the njlynch/issues-5734 branch May 6, 2020 14:52
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.

Lambda cannot subscribe to SNS Topic in different region

5 participants