-
-
Save AllieUbisse/975bfb4afc2406add9b0a98d224d927f to your computer and use it in GitHub Desktop.
Add own policy to a lambda function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
lamba_client = boto3.client('lambda', region_name='REGION_NAME') | |
lamba_client.add_permission( | |
FunctionName='create_lab', | |
StatementId='AWSEventsRule', | |
Action='lambda:InvokeFunction', | |
Principal='events.amazonaws.com', | |
SourceArn='arn:aws:events:REGION_NAME:ACCOUNT_NUMBER:rule/*', | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment