【发布时间】:2019-04-23 07:20:46
【问题描述】:
我正在尝试使用serverless resources 创建一个ConfigurationSetEventDestination,但它无法识别EventDestination 的值SNSDestination,这是输出。
这里是来自serverless.yml的资源
resources:
Resources:
HandleEmailsEvents:
Type: AWS::SNS::Topic
Properties:
DisplayName: 'Handle emails events (${self:custom.stage})'
TopicName: 'HandleEmailsEvents'
ConfigurationSet:
Type: 'AWS::SES::ConfigurationSet'
Properties:
Name: 'EMAIL_TRACKING'
ConfigurationSetEventDestination:
Type: 'AWS::SES::ConfigurationSetEventDestination'
Properties:
ConfigurationSetName: 'EMAIL_TRACKING'
EventDestination:
Name: 'EMAIL_TRACKING_DESTINATION'
Enabled: true
MatchingEventTypes:
- bounce
- complaint
SNSDestination:
TopicARN:
Ref: 'HandleEmailsEvents'
按照文档ConfigurationSetEventDestination EventDestination 似乎不可用,但here 它与this 描述对象。
从控制台创建时也可以使用 SNSDestination
@AWS 这里发生了什么?
谢谢,
PS:我不是唯一一个......
https://forums.aws.amazon.com/thread.jspa?messageID=858616󑧸
https://forums.aws.amazon.com/thread.jspa?messageID=809004󅠬
https://forums.aws.amazon.com/thread.jspa?messageID=848013󏂍
[更新]
我尝试通过 nodejs sdk 创建相同的,它可以工作,它可能,文档here。
可能是无服务器 CloudFormation 生成的堆栈?
let ses = new AWS.SES()
const destinationParams = {
ConfigurationSetName: 'test',
EventDestination: {
Name: 'xxxxx2',
MatchingEventTypes: ['send', 'reject', 'bounce', 'complaint', 'delivery', 'open', 'click'],
Enabled: true,
SNSDestination: {
TopicARN: 'arn:aws:sns:us-east-1:xxxxxxxxxx:test',
},
},
};
ses.createConfigurationSetEventDestination(destinationParams, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
【问题讨论】:
-
我现在遇到了完全相同的问题。你找到解决方案了吗?
-
不,我最终手动创建并使用键名进行渲染,而不是全部在 cloudformation 堆栈中
-
天哪,太糟糕了。谢谢你的信息!
-
按照目前的文档,SNS 不能成为 cloudformation 中的目的地。
标签: amazon-web-services amazon-cloudformation amazon-sns amazon-ses serverless-framework