1 Answer
- Newest
- Most votes
- Most comments
0
Hello.
Is the following policy set in Lambda's access policy?
https://docs.aws.amazon.com/lambda/latest/dg/access-control-resource-based.html
https://repost.aws/knowledge-center/lambda-invoke-error-s3-bucket-permission
{
"Version": "2012-10-17",
"Id": "example-ID",
"Statement": [
{
"Sid": "s3invoke",
"Effect": "Allow",
"Principal": {
"Service": "s3.amazonaws.com"
},
"Action": "lambda:InvokeFunction",
"Resource": "arn:aws:lambda:Region:account-id:function:function-name",
"Condition": {
"StringEquals": {
"AWS:SourceAccount": "bucket-owner-account-id"
},
"ArnLike": {
"AWS:SourceArn": "arn:aws:s3:::awsexamplebucket1"
}
}
}
]
}
Relevant content
- asked 8 months ago
- Accepted Answerasked 2 years ago
- asked 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated a year ago
Thanks for your revert, My question is that can we add triggers to lambda function alias using command line.
Yes, it is possible to set triggers using commands. And I think the error you shared may occur when there is a problem with Lambda's resource-based policy, so I think you need to check it.