Security implications of SourceArn (as in AWS::Lambda::Permission)

0

These two doc pages:

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-permission.html

https://docs.aws.amazon.com/lambda/latest/dg/API_AddPermission.html

have a note:
bq. If you grant permission to a service principal without specifying [SourceArn], other accounts could potentially configure resources in their account to invoke your Lambda function.
I'm unclear on what, exactly, that means.

Let's say I specify a Principal of "s3.amazonaws.com", and I leave SourceArn blank. Does that mean my lambda could be invoked by any random person's S3 bucket, if they managed to find my Lambda's ARN and configure their bucket accordingly?

Edited by: SyntaxColoring on May 27, 2020 9:32 PM

Maxpm
質問済み 4年前555ビュー
1回答
0
承認された回答

Answering my own question.

Yes, if you leave SourceArn blank, other accounts really will be able to execute your Lambda function.

I tested this as described here: https://github.com/terraform-providers/terraform-provider-aws/pull/12794#discussion_r431612010

Maxpm
回答済み 4年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ