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

Fix: Impossible to use intrinsic functions in S3 triggering event #1824

Closed
wants to merge 3 commits into from
Closed

Fix: Impossible to use intrinsic functions in S3 triggering event #1824

wants to merge 3 commits into from

Conversation

fbn-roussel
Copy link

@fbn-roussel fbn-roussel commented Nov 21, 2020

Issue #, if available:
#1739

Description of changes:
Updating _inject_notification_configuration function to handle Ref intrinsic function for S3 triggering event types.

Description of how you validated changes:
Added a test case using Ref intrinsic function.
The fix I made was suggested by this comment : #1739 (comment)

Checklist:

  • Write/update tests
  • make pr passes
  • Update documentation
  • Verify transformed template deploys and application functions as expected

Examples?

Please reach out in the comments, if you want to add an example. Examples will be
added to sam init through https://github.com/awslabs/aws-sam-cli-app-templates/

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 Nov 21, 2020

Codecov Report

Merging #1824 (8b51a65) into develop (f6d9c8c) will increase coverage by 0.32%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1824      +/-   ##
===========================================
+ Coverage    94.04%   94.37%   +0.32%     
===========================================
  Files           87       87              
  Lines         5695     5970     +275     
  Branches      1153     1270     +117     
===========================================
+ Hits          5356     5634     +278     
+ Misses         156      152       -4     
- Partials       183      184       +1     
Impacted Files Coverage Δ
samtranslator/model/eventsources/push.py 90.65% <100.00%> (ø)
samtranslator/model/lambda_.py 90.24% <0.00%> (-2.86%) ⬇️
samtranslator/plugins/globals/globals.py 100.00% <0.00%> (+0.94%) ⬆️
samtranslator/model/sam_resources.py 95.46% <0.00%> (+2.04%) ⬆️
samtranslator/translator/logical_id_generator.py 100.00% <0.00%> (+9.09%) ⬆️

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 f6d9c8c...8b51a65. Read the comment docs.

@fbn-roussel fbn-roussel reopened this Nov 25, 2020
@Jacco
Copy link
Contributor

Jacco commented Feb 6, 2021

I have tried to deploy the template that was generated using the code in this PR. But I get an CREATE_FAILED error with the message:

Value of property Event must be of type String

Then I changed the template so that the parameters are of String type. Then it gave the error notification not supported for event.

Then I changed the template so that the parameters contained one value only. (No comma). And that worked.

@jfuss
Copy link
Contributor

jfuss commented Jun 15, 2022

Cleaning up old PRs that are no longer active in to help us get the PR backlog in better shape. Closing this PR as the "from" repo is no longer.

Intrinsic support is hit or miss throughout our repo to this point. Mostly because it requires us to re-implement how CloudFormation resolving works. This does not appear to be that and instead looks like we would need to pass along the value correctly to CloudFormation. Happy to still accept a PR in this area. The team has been working on process improvements in looking at PRs faster, so the lingering reviews from maintainers shouldn't happen for new PRs.

@jfuss jfuss closed this Jun 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants