Instantly share code, notes, and snippets.

Embed
What would you like to do?
Comandos para criar/editar/listar/remover um lambda utilizando o awscli
echo -e "
def handler(event, context):
return {
'texto': 'hello world lambda usando awscli',
}
" >> main.py
zip -qr awsclicreatelambda.zip main.py
aws lambda create-function \
--region us-east-1 \
--handler main.handler \
--runtime python3.7 \
--function-name 'awscli-create-lambda' \
--zip-file fileb://./awsclicreatelambda.zip \
--role 'PEGUE_SUA_ARN'
aws lambda list-functions
aws lambda update-function-code \
--region us-east-1 \
--function-name 'awscli-create-lambda' \
--zip-file fileb://./awsclicreatelambda.zip
aws lambda invoke \
--region us-east-1 \
--function-name 'awscli-create-lambda' \
--payload '{}' \
awsclicreatelambda.output
aws lambda delete-function \
--region us-east-1 \
--function-name 'awscli-create-lambda'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment