Created
October 18, 2024 00:25
-
-
Save acdha/72de01b7b3dfb2d316f418578da7f0ab to your computer and use it in GitHub Desktop.
AWS Lambda sucker - handy for introspecting your Lambda packages
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
#!/bin/bash | |
set -e -u -o pipefail | |
LAMBDA="$1" | |
if [ -z "$LAMBDA" ]; then | |
echo "Usage: $0 lambda-function-name" > /dev/stderr; exit 1 | |
fi | |
curl -fso "$LAMBDA".zip "$(aws lambda get-function --function-name "arn:aws:lambda:us-east-1:$(aws sts get-caller-identity --query "Account" --output=text):function:$1" --query Code.Location --output=text)" && unzip "$LAMBDA".zip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment