AWS::Lambda::Permission 中 SourceArn 的安全含义

0

【以下的问题经过翻译处理】 这两个文档页面:

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

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

有一个注意事项:

bq。如果您授予服务主体没有指定[SourceArn]的权限,其他账户可能会配置其账户中的资源以调用您的Lambda函数。

我不清楚这确切意思是什么。

假设我指定了“s3.amazonaws.com”的主体,并且我将SourceArn留空。这是否意味着,如果他们找到了我的Lambda函数的ARN并配置了他们的Bucket,任何随机人都可以调用我的Lambda函数?

profile picture
ESPERTO
posta 5 mesi fa11 visualizzazioni
1 Risposta
0

【以下的回答经过翻译处理】 回答自己的问题。

是的,如果您将SourceArn留空,其他账户确实能够执行您的Lambda函数。

我按照这里描述的进行了测试:https://github.com/terraform-providers/terraform-provider-aws/pull/12794#discussion_r431612010

profile picture
ESPERTO
con risposta 5 mesi fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande