Using Console
Using CLI
<function-name>
with the name of the Lambda function that is allowing cross-account access, and <statement-id>
with the ID of the statement that allows cross-account access.
For example:
<function-name>
with the name of the Lambda function that you updated.
The output should show that the resource-based policy now denies cross-account access.
Using Python
<region>
, <account-id>
, and <function-name>
with the appropriate values for your Lambda function.