This might be a simple question but I can’t figure out how to reference the output from CloudFormation in my serverless.yml file. What I would like to do is actually capture some of the information for the items created as events for my functions and use them as environment variables. For instance, one of my functions is triggered by SNS and looks like this:
sendAlert:
handler: SendAlert/handler.sendAlert
memorySize: 128
events:
- sns:
topicName: ${self:custom.sendAlertTopicName}
What I’d like to be able to do is get the ARN for the topic that gets created and set it to an environment variable calld SEND_ALERT. How do I capture this and set it in the yaml file?
Thanks in advance,
Nick