I would like to manage my AWS Lambda Functions from Python script, without having to use the AWS Website Console. The idea is to be able to quickly recreate/migrate/setup my applications objects (tables, functions etc.) into a new AWS Cloud Account or Region.
It is easy to do this with DynamoDB tables, for instance:
import boto3
resource = boto3.resource(service_name='dynamodb', region_name='region', ...)
resource.create_table(
TableName='table_name',
KeySchema=[...],
AttributeDefinitions={...},
ProvisionedThroughput={...}
)
Done! I just created a new DynamoDB table from Python Script. How can I do the same for Lambda Functions? Say... create a new function, configure ‘Function Name’ and ‘Runtime’, maybe set up a ‘Role’ and upload a script from file. That’d be really helpful.
Thanks in advance.