repositories

daemon-sec-cheatsheet

The cheatsheet vault for operators: AD, enumeration, exploitation, priv-esc, web, DFIR

clonegit clone https://git.daemon-sec.xyz/daemon-sec-cheatsheet.git
aws-lambda.mdMarkdown62 lines1.5 KiBsource raw download

title: "AWS - Service - Lambda & API Gateway" section: "Cloud" sectionSlug: "cloud" sourcePath: "docs/cloud/aws/aws-lambda.md" sourceUrl: "https://github.com/swisskyrepo/InternalAllTheThings/blob/203bb0c0b290/docs/cloud/aws/aws-lambda.md" sha: "203bb0c0b290" isIndex: false#

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#