我有
serverless.yaml
对于许多SNS主题,我需要从不同帐户和地区的名称构建ARN,因此我使用了一个自定义前缀
custom:
snsTopicPrefix:
Fn::Join:
- ":"
- - "arn:aws:sns"
- !Ref "AWS::Region"
- !Ref "AWS::AccountId"
topic01: Topic-01-test
functions:
from-SNS:
handler: src/fromSNS/handler.fromSNS
events:
- sns:
arn: ${self:custom.snsTopicPrefix}:${self:custom.topic01}
topicName: ${self:custom.topic01}
但是,当我部署它时,我不能传递错误
Trying to populate non string value into a string for variable ${self:custom.snsTopicPrefix}. Please make sure the value of the property is a string.