Difference between revisions of "Aws lambda get-function"
Jump to navigation
Jump to search
(Created page with "{{lc}} {{aws lambda}}") |
|||
| (5 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{lc}} | {{lc}} | ||
| + | * https://docs.aws.amazon.com/cli/latest/reference/lambda/get-function.html | ||
| + | [[aws lambda get-function --function-name]] | ||
| − | {{aws lambda}} | + | |
| + | Bash: | ||
| + | FUNC_NAME="YOUR_LAMBDA_FUNCION_NAME"; | ||
| + | DIR=$(mktemp -d /tmp/lambda_XXXX); | ||
| + | curl -sL $(aws lambda get-function --function-name $FUNC_NAME --query 'Code.Location' --output text) -o "$DIR/code.zip" && unzip -q "$DIR/code.zip" -d "$DIR" && rm "$DIR/code.zip" && echo "Code in: $DIR" | ||
| + | |||
| + | Fish | ||
| + | set FUNC_NAME "YOUR_LAMBDA_FUNCION_NAME"; | ||
| + | set DIR (mktemp -d /tmp/lambda_XXXX); | ||
| + | curl -sL (aws lambda get-function --function-name $FUNC_NAME --query 'Code.Location' --output text) -o "$DIR/code.zip"; and unzip -q "$DIR/code.zip" -d "$DIR"; and rm "$DIR/code.zip"; and echo "Code in: $DIR" | ||
| + | |||
| + | |||
| + | == See also == | ||
| + | * {{aws lambda}} | ||
| + | |||
| + | [[Category:AWS]] | ||
Latest revision as of 09:20, 18 June 2026
aws lambda get-function --function-name
Bash:
FUNC_NAME="YOUR_LAMBDA_FUNCION_NAME"; DIR=$(mktemp -d /tmp/lambda_XXXX); curl -sL $(aws lambda get-function --function-name $FUNC_NAME --query 'Code.Location' --output text) -o "$DIR/code.zip" && unzip -q "$DIR/code.zip" -d "$DIR" && rm "$DIR/code.zip" && echo "Code in: $DIR"
Fish
set FUNC_NAME "YOUR_LAMBDA_FUNCION_NAME"; set DIR (mktemp -d /tmp/lambda_XXXX); curl -sL (aws lambda get-function --function-name $FUNC_NAME --query 'Code.Location' --output text) -o "$DIR/code.zip"; and unzip -q "$DIR/code.zip" -d "$DIR"; and rm "$DIR/code.zip"; and echo "Code in: $DIR"
See also[edit]
Advertising: