
Connecting Lambda To Api Gateway
Connects an existing Lambda function to API Gateway with proxy integration, CORS, permissions, and deployment.
- skills.sh installs
- 7.3K
- GitHub stars
- 3.5K
- last updated
- Aug 21, 2026
What it does
- Covers creating a REST API, resource and method setup, Lambda proxy integration, and stage deployment
- Supports configurable authorization types: NONE, AWS_IAM, COGNITO_USER_POOLS, and CUSTOM, plus optional API keys
- Includes production hardening for throttling and access logging, with CORS setup and troubleshooting for 502 and permission errors
- Designed for developers wiring existing Lambda functions to a REST or HTTP API without hand-building each resource
Install
$ npx -y skills add aws/agent-toolkit-for-aws --skill connecting-lambda-to-api-gateway -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
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
Details
- Repository
- github.com/aws/agent-toolkit-for-aws
- Categories
- Backend & APIs, DevOps & Cloud
- First seen
- May 16, 2026
More from aws/agent-toolkit-for-aws
All 54- Aws Sdk Swift Usage7.3K
- Ingesting Into Data Lake7.2K
- Aws Amplify7.2K
- Creating Data Lake Table7.2K
- Finding Data Lake Assets7.2K
- Troubleshooting Application Failures7.2K
- Connecting Lambda To Dynamodb7.1K
- Configuring Vpc Endpoints For Private Aws Service Access7.1K
- Debugging Lambda Timeouts7.1K
- Setting Up Cloudwatch Alarm Notifications7K
- Launching Ec2 Instance With Best Practices7K
- Troubleshooting S3 Files7K
- Creating Api Gateway Stage7K
- Setting Up Ec2 Instance Profiles6.9K
- Signing In To Aws6.9K
- Creating Production Vpc Multi Az6.8K
- Aws Transform6.8K
- Connecting Vpcs With Peering6.8K
- Enabling Lambda Vpc Internet Access6.8K
- Exporting Rds To S36.7K
- Setting Up Cloudtrail Multi Region6.7K
- Creating Amazon Aurora Db Cluster With Instances6.7K
- Troubleshooting Efs6.6K
- Routing Traffic With Route53 And Cloudfront6.5K
Similar to Connecting Lambda To Api Gateway
More Backend & APIs
api-gatewayitsmostafa/aws-agent-skills143 installsAWS API Gateway guide for creating, securing, and troubleshooting REST, HTTP, and WebSocket APIs.
creating-api-gateway-stageaws/agent-toolkit-for-aws7K installsConfigures an API Gateway stage with logging, tracing, throttling, WAF, and IAM controls for environment deploys.
api-gateway-configurationsecondsky/claude-skills425 installsAPI gateway configuration examples for Kong, Nginx, and AWS API Gateway, covering routing, auth, and rate limiting.
enabling-lambda-vpc-internet-accessaws/agent-toolkit-for-aws6.8K installsStep-by-step AWS procedure that gives VPC-attached Lambda functions outbound internet access through NAT Gateway routing.
aws-lambda-python-integrationgiuseppe-trisciuoglio/developer-kit3.8K installsPython Lambda guidance comparing AWS Chalice with raw handlers, covering cold starts, API Gateway, and deployment.
cors-configurationpatricio0312rev/skills294 installsConfigures CORS for APIs and web apps with origin allowlists, preflight handling, and credential rules.