Skip to content

Conversation

chrisoverzero
Copy link
Contributor

@chrisoverzero chrisoverzero commented Nov 25, 2019

Issue #, if available: Fixes #1253.

Description of changes:

When the AWS::Lambda::Permission resource was created for a Cognito event, it used the EventSourceToken property. This caused authentication (or, in my case, pre-authentication) events to fail to execute "due to error AccessDeniedException". This PR changes that to the SourceArn property.

Description of how you validated changes:

I deployed a transformed template of one of my applications and attempted to authenticate. I succeeded. 🎉

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.

...rather than one with `EventSourceToken`.
@codecov-io
Copy link

Codecov Report

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

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1260      +/-   ##
===========================================
+ Coverage    94.48%   94.49%   +<.01%     
===========================================
  Files           72       72              
  Lines         3738     3739       +1     
  Branches       740      740              
===========================================
+ Hits          3532     3533       +1     
  Misses         104      104              
  Partials       102      102
Impacted Files Coverage Δ
samtranslator/model/eventsources/push.py 89.83% <100%> (+0.02%) ⬆️

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 3725f00...4c57d11. Read the comment docs.

@chrisoverzero chrisoverzero changed the title Transform Cognito Events to a Permission with SourceArn fix: Transform Cognito Events to a Permission with SourceArn Nov 26, 2019
@praneetap praneetap self-assigned this Dec 4, 2019
Copy link
Contributor

@praneetap praneetap left a comment

Choose a reason for hiding this comment

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

@chrisoverzero Thanks for contributing this PR!

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.

Cognito Events Transform to Wrong Permission

4 participants