我已按照以下说明操作:https ://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#dlq为了从命令行异步调用我的 Lambda 函数:
aws lambda invoke --function-name MyLambda --invocation-type Event --payload '{private information}' response.json
{
"StatusCode": 202
}
我确实被status code 202
退回,但我没有看到任何有关执行的日志。
我怎样才能解决这个问题?
编辑:
以下是我的 JSON 格式的执行策略:
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"logs:CreateLogStream"
],
"Resource": [
"arn:aws:logs:xx-xxxx-x:xxxxxxxx:log-group:/aws/lambda/LambdaConfigService-dev*:*"
],
"Effect": "Allow"
},
{
"Action": [
"logs:PutLogEvents"
],
"Resource": [
"arn:aws:logs:xx-xxxx-x:xxxxxxxx:log-group:/aws/lambda/LambdaConfigService-dev*:*:*"
],
"Effect": "Allow"
},
{
"Action": "s3:*",
"Resource": "*",
"Effect": "Allow"
}
]
}