Skip to content

Instantly share code, notes, and snippets.

@ChunAllen
Last active July 29, 2021 11:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ChunAllen/35622dede95013adb57d706c851a7211 to your computer and use it in GitHub Desktop.
Save ChunAllen/35622dede95013adb57d706c851a7211 to your computer and use it in GitHub Desktop.
AWS CLI Commands
// Upload zip to AWS Lambda
aws lambda update-function-code --function-name my-function --zip-file fileb://function.zip
// Define environment variables. Comma separated
aws lambda update-function-configuration --function-name my-function \
--environment "Variables={BUCKET=my-bucket,KEY=file.txt}"
// Get Information of Lambda
aws lambda get-function-configuration --function-name my-function
// Download object from S3
aws s3api get-object --bucket {{bucket_name}} --key {{object_from_s3.zip}} {{downloaded_file_name.zip}}
// Upload object to S3
aws s3api put-object --bucket {{bucket_name}} --key {{file_name}} --body {{actual_file}}
// Delete object from S3
aws s3api delete-object --bucket {{bucket_name}} --key {{file_name}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment