问题描述
我正在使用AWS Lambda,并想为失败事件记录配置目标。但是,当我使用本地堆栈进行操作并发送错误的记录时,它并没有将其插入配置的目标位置,即SNS。
我指的是此链接- https://docs.aws.amazon.com/lambda/latest/dg/with-kinesis.html#services-kinesis-errors
随附的是我的代码和创建lambda的步骤-
- 创建lambda函数:
awslocal lambda create-function --function-name FunctionName --runtime python3.8 --role admin --handler app.execute --zip-file fileb://development.zip
awslocal lambda create-event-source-mapping --function-name FunctionName \
--event-source arn:aws:kinesis:us-east-1:xxxxxxxxxxxx:stream/develop_Feed \
--batch-size 1 --starting-position LATEST --destination-config '{"OnFailure":{"Destination": "arn:aws:sqs:us-east-1:xxxxxxxxxxxx:error_messages"}}'
awslocal lambda update-function-configuration --function-name FunctionName \
--environment "Variables={TO_FILTER_ParaMETERS=operation,KInesIS_ENDPOINT_URL='http://<ip>:<port>',OUTPUT_STREAM=filtered_Feed,LOG_LEVEL=DEBUG,ERROR_STREAM='error_Feed'}"
唯一的变化是:
awslocal lambda update-function-code --function-name FunctionName --zip-file fileb://development.zip
- 要列出:
awslocal lambda list-functions
awslocal kinesis list-streams
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)