You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is nice that we have the option to specify an ARN of existing sns or DynamoDB stream. This approach is good for pets but not for cattle. We don't provide the names for our resources. Hardcoded string inside a serverless.yml doesn't work for us.
For feature proposals:
Ability to specify a sns or stream property by using the intrinsic function Fn::ImportValue
This PR add #3188 #3189 introduced a generic helper AwsProvider#resolveExportValue. It is in use to resolve deploymentBucket right now
AwsProvider#resolveExportValue can be used compileSNSEvents method of class compileSNSEvents
I encountered the same limitation this past week and have been thinking about ways to work around it. Using the $(cf) variable syntax allows me to pass in the arn correctly but by evaluating and injecting the string directly I lose the benefit of CloudFormation enforcing referential integrity with that approach (e.g. I can modify/delete the referenced resource even though resources in another stack depend on it). I would much prefer to use the Fn::ImportValue syntax to prevent accidental modification/deletion from happening.
Stream events already support both Fn::GetAtt as well as Fn::ImportValue via the code block below, and something similar could easily be implemented for SNS.
@pmuens it looks like the global arn parser feature (proposed just over a year ago) is on hold / waiting for support. In the meantime, would you be open to a feature proposal to bring intrinsic function support to SNS events the same way that it has been implemented for stream events? It's not as universally beneficial as the universal arn parser, obviously, but it follows an existing pattern and is much simpler to implement in the here and now :)
This is a Feature Proposal
Description
It is nice that we have the option to specify an ARN of existing sns or DynamoDB stream. This approach is good for pets but not for cattle. We don't provide the names for our resources. Hardcoded string inside a serverless.yml doesn't work for us.
For feature proposals:
Ability to specify a sns or stream property by using the intrinsic function Fn::ImportValue
This PR add #3188 #3189 introduced a generic helper AwsProvider#resolveExportValue. It is in use to resolve deploymentBucket right now
AwsProvider#resolveExportValue can be used compileSNSEvents method of class compileSNSEvents
serverless/lib/plugins/aws/deploy/compile/events/sns/index.js
Lines 28 to 29 in ed4a66d
serverless/lib/plugins/aws/deploy/compile/events/sns/index.js
Line 22 in ed4a66d
The text was updated successfully, but these errors were encountered: