ClaudeCodeMod

All shelves / Skills

connecting-lambda-to-api-gateway

aws/agent-toolkit-for-aws · 7.5k installs · 3.4K stars

Skill Domain expertise for creating Amazon API Gateway REST APIs and connecting them to existing Lambda functions. Covers API creation, resource and method setup, Lambda proxy integration, CORS configuration, security controls, deployment, and testing.

Marked Command Execution

Install

The repo has no one-line install. Follow its README.

Open the repo

Files

SKILL.md

Connecting Lambda to API Gateway

Overview

Domain expertise for creating Amazon API Gateway REST APIs and connecting them to existing Lambda functions. Covers API creation, resource and method setup, Lambda proxy integration, CORS configuration, security controls, deployment, and testing.

Connect a Lambda function to API Gateway

To create a REST API and wire it to a Lambda function, follow the procedure exactly. See Lambda to API Gateway connection procedure.

The procedure supports configurable authorization types (NONE, AWS_IAM, COGNITO_USER_POOLS, CUSTOM), optional API key requirements, CORS setup, and production security hardening including throttling and access logging.

Troubleshooting

502 Bad Gateway

The Lambda function must return a proxy-compatible response with statusCode, headers, and a stringified body. See the full procedure for format details.

Permission denied invoking Lambda

Ensure lambda:InvokeFunction permission was added with the correct API Gateway source ARN. See the full procedure for details.

CORS errors in browser

Verify enable_cors was set to true, the OPTIONS method was created, and CORS headers are configured in both method and integration responses.

Facts

Kind
Skill
Repo
aws/agent-toolkit-for-aws
Group
Uncategorized
Installs
7.5k
Stars
3.4K

From the same repo

  1. 3841ingesting-into-data-lakeaws/agent-toolkit-for-aws7.5k
  2. 3842aws-amplifyaws/agent-toolkit-for-aws7.5k
  3. 3843creating-data-lake-tableaws/agent-toolkit-for-aws7.5k
  4. 3846finding-data-lake-assetsaws/agent-toolkit-for-aws7.4k
  5. 3852troubleshooting-application-failuresaws/agent-toolkit-for-aws7.4k
  6. 3862connecting-lambda-to-dynamodbaws/agent-toolkit-for-aws7.4k