Reputation: 101
I have followed instructions at: https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#dlq in order to invoke my Lambda function asynchronously from command line:
aws lambda invoke --function-name MyLambda --invocation-type Event --payload '{private information}' response.json
{
"StatusCode": 202
}
I do get status code 202
returned but I do not see any logs regarding the execution.
How can I fix this?
EDIT:
Below is my execution policy in JSON format:
{
"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"
}
]
}
Upvotes: 0
Views: 1034
Reputation: 101
For some reason asynchronous logs needed around 5 mins to be created. I just left CloudWatch Logs page open for a while, refreshed and they've appeared (note that they did not appear on first couple of refresh actions once lambda function was executed). Apologize for the trouble, and many thanks.
Upvotes: 1