Save AWS Lambda Configuration and Code
Save AWS Roles and policies
- aws cli
- jq
- wget or curl
- unzip
extract-lambda.sh <function-name> <output-folder>
It creates the folder <output-folder>/<function-name>
with the following content
get-function-configuration.json
- output ofaws lambda get-function-configuration
get-function.json
- output ofaws lambda get-function
get-policy.json
- output ofaws lambda get-policy
policy.json
- JSON parsed PolicyREADME.md
- with function name, description, runtime, timeout, memory, handler, role and additional policies
And the code of the function. It does not save layers
Runtime: nodejs12.x
Timeout(s): 3
Memory(Mb): 128
Handler: index.handler
Role: TI-LambdaReadWriteDB
Additional policies:
{
"service": "apigateway.amazonaws.com",
"action": "lambda:InvokeFunction"
}
{
"service": "apigateway.amazonaws.com",
"action": "lambda:InvokeFunction"
}
Autogenerated
- aws cli
- jq
extract-roles.sh
It creates the folder roles
with the following content
AWSServiceRoleForAPIGateway-get-role.json
AWSServiceRoleForAPIGateway-list-attached-role-policies.json
list-roles.json
- output ofaws list-roles
<role-name>-get-role.json
- output ofaws lambda get-role
<role-name>-list-attached-role-policies.json
- output ofaws lambda list-attached-role-policies
README.md
- with roles, description, policies and assumed roles (services)
Service linked role for Amazon Cognito User Pools service to send emails on your behalf
AmazonCognitoIdpEmailServiceRolePolicy
email.cognito-idp.amazonaws.com
Autogenerated