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 support to specify a SNS topic that belongs to a different region #989

Merged
merged 1 commit into from
Jul 2, 2019

Conversation

53ningen
Copy link
Contributor

@53ningen 53ningen commented Jun 21, 2019

Issue #, if available:
#105

Description of changes:
Add support to specify a SNS topic that belongs to a different region.

I made changes in the steps written in the issue below:
#105 (comment)

Description of how you validated changes:
I verified transformed template in the steps written in DEVELOPMENT_GUIDE.

I confirmed that SAM template below could be deployed successfully.

Resources:
  WorkerFunction:
    Type: AWS::Serverless::Function
    Properties:
      CodeUri: worker_lambda/
      Handler: app.lambda_handler
      Events:
        MessageTopic:
          Type: SNS
          Properties:
            Topic: (different region TopicArn)
            Region: (different region name)

also confirmed the SAM template below too.

Resources:
  WorkerFunction:
    Type: AWS::Serverless::Function
    Properties:
      CodeUri: worker_lambda/
      Handler: app.lambda_handler
      Events:
        MessageTopic:
          Type: SNS
          Properties:
            Topic: (same region TopicArn)

I published a message to the SNS topic and confirmed to trigger Lambda function successfully.

Checklist:

  • Write/update tests
  • make pr passes
  • Update documentation
  • Verify transformed template deploys and application functions as expected
  • Add/update example to examples/2016-10-31

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

@codecov-io
Copy link

codecov-io commented Jun 21, 2019

Codecov Report

Merging #989 into develop will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #989      +/-   ##
===========================================
+ Coverage    94.71%   94.71%   +<.01%     
===========================================
  Files           69       69              
  Lines         3160     3162       +2     
  Branches       606      607       +1     
===========================================
+ Hits          2993     2995       +2     
  Misses          85       85              
  Partials        82       82
Impacted Files Coverage Δ
samtranslator/model/sns.py 100% <ø> (ø) ⬆️
samtranslator/model/eventsources/push.py 88.92% <100%> (+0.07%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 88df20c...95a90d2. Read the comment docs.

Copy link
Contributor

@jlhood jlhood left a comment

Choose a reason for hiding this comment

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

Thanks so much for this contribution!

@jlhood jlhood merged commit 7361002 into aws:develop Jul 2, 2019
@53ningen 53ningen deleted the feature/xregion-topic branch July 2, 2019 17:54
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.

None yet

4 participants