connecting-lambda-to-api-gateway

Connect an existing AWS Lambda function to Amazon API Gateway via proxy integration.

Updated May 12, 2026
One-click install
npx skills add https://github.com/mreferre/aws-agent-toolkit-skills --skill connecting-lambda-to-api-gateway
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: connecting-lambda-to-api-gateway
Source: https://github.com/mreferre/aws-agent-toolkit-skills/tree/main/.kiro/skills/connecting-lambda-to-api-gateway
Command: npx skills add https://github.com/mreferre/aws-agent-toolkit-skills --skill connecting-lambda-to-api-gateway

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Connecting an existing AWS Lambda function to API Gateway is easy to get wrong, often leaving out critical production settings like permissions, CORS handling, throttling, and access logging.

Core Features & Use Cases

  • Lambda proxy integration setup: Wires API Gateway to invoke Lambda using AWS_PROXY with the correct integration URI format.
  • Authorization, API keys, and CORS: Supports NONE/AWS_IAM/COGNITO_USER_POOLS/CUSTOM, optional API key enforcement, and conditional CORS configuration including OPTIONS support.
  • Production security hardening: Guides recommended controls such as throttling/usage plans and access logging, plus notes on deployment risks and troubleshooting common integration failures.
  • Use case: Expose an internal “create-order” Lambda endpoint behind an API Gateway REST API for frontend consumption with proper browser CORS behavior and hardened production controls.

Quick Start

Use this skill to connect your existing Lambda function to a new API Gateway REST API by providing the required Lambda name and API name, then deploy to your chosen stage.

Frequently Asked Questions about connecting-lambda-to-api-gateway

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I connect an AWS Lambda function to API Gateway?

Connecting Lambda to API Gateway requires creating a REST API endpoint that invokes Lambda via proxy integration using the correct region-scoped URI and AWS_PROXY type, which this Skill automates.

What is Lambda proxy integration in API Gateway?

Lambda proxy integration is a mechanism where API Gateway forwards the entire client request to Lambda as a structured JSON payload, requiring proxy-compatible response format handling for successful serverless API exposure.

How do I configure CORS for a Lambda API Gateway endpoint?

Configuring CORS for a Lambda API Gateway endpoint requires conditional CORS configuration including OPTIONS method support, enabling browsers to safely consume the serverless REST API for frontend applications.

Can I use Cognito User Pools authorization with API Gateway and Lambda?

Yes, this Skill supports API Gateway authorization selection including NONE, AWS_IAM, COGNITO_USER_POOLS, and CUSTOM authorizers to securely expose Lambda functions behind REST APIs.

Why does my API Gateway Lambda integration return a permissions error?

API Gateway Lambda integration permissions errors occur when correct Lambda invoke permissions are missing; this Skill configures the required invoke permissions and region-scoped integration URIs to prevent deployment failures.

Do I need an API key to enforce throttling on my Lambda REST API?

API key enforcement is optional for Lambda REST APIs, but recommended for production security hardening alongside usage plans, throttling controls, and access logging to safely expose serverless endpoints.