问题描述
我使用的是无服务器框架,带有 SQS 的触发函数 hello
,使用以下配置正确完成。
functions:
hello:
handler: handler.hello
events:
# Provide the ARN of your queue
- sqs: arn:aws:sqs:us-east-1:abc:sqs_input
将目的地添加到配置后
destinations:
onSuccess: arn:aws:sqs:us-east-1:abc:sqs_output
onFailure: arn:aws:sqs:us-east-1:abc:sqs_output
只有当我从 AWS CLI 调用它并添加 --invocation-type Event
参数时它才能正常工作
aws lambda invoke --function-name testdestination-dev-hello --invocation-type Event response.json
但在我的情况下,输入将由输入 SQS 触发,我无法添加 --invocation-type Event
选项,那么我如何始终激活 SQS 目标?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)