// Internal · Cloud

AWS - Service - Lambda & API Gateway

AWS - Service - Lambda & API Gateway

List Lambda Functions

aws lambda list-functions

Invoke a Lambda Function

aws lambda invoke --function-name name response.json --region region 

Extract Function’s Code

aws lambda list-functions --profile uploadcreds
aws lambda get-function --function-name "LAMBDA-NAME-HERE-FROM-PREVIOUS-QUERY" --query 'Code.Location' --profile uploadcreds
wget -O lambda-function.zip url-from-previous-query --profile uploadcreds

List API Gateway

aws apigateway get-rest-apis
aws apigateway get-rest-api --rest-api-id ID

Listing Information About Endpoints

aws apigateway get-resources --rest-api-id ID
aws apigateway get-resource --rest-api-id ID --resource-id ID
aws apigateway get-method --rest-api-id ApiID --resource-id ID --http-method method

Listing API Keys

aws apigateway get-api-keys --include-values

Getting Information About A Specific Api Key

aws apigateway get-api-key --api-key KEY

References

☧ CPTS · ordered posts

Locked

Unlock with your Main_Key through local GPG.

Start the local GPG helper

In your cheatsheet checkout, run:

npm run unlock:helper

Open the link it prints, or paste its pairing code below. Keep the terminal open until GPG finishes.

Import an index you already decrypted

Download the encrypted index, then decrypt with GPG:

gpg --output report-index.json --decrypt report-index.gpg

Your private key stays in GPG. The decrypted index is saved in this browser so you can reopen it after navigation, refreshes and restarts. Lock this browser or clear this site's browser data to remove the saved index. Nothing is uploaded.