connecting-lambda-to-api-gateway

Automate wiring an existing AWS Lambda function to API Gateway REST or HTTP APIs.

2.3k|234|Updated Apr 23, 2026
One-click install
npx skills add https://github.com/aws/agent-toolkit-for-aws --skill connecting-lambda-to-api-gateway-aws
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: connecting-lambda-to-api-gateway
Source: https://github.com/aws/agent-toolkit-for-aws/tree/main/skills/specialized-skills/serverless-skills/connecting-lambda-to-api-gateway
Command: npx skills add https://github.com/aws/agent-toolkit-for-aws --skill connecting-lambda-to-api-gateway-aws

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Connecting existing AWS Lambda functions to API Gateway requires multiple steps, precise configuration, and production hardening. This skill provides a clear, repeatable workflow to create REST or HTTP APIs, wire Lambda functions via Lambda proxy integration, configure permissions, deployment, and essential safeguards like CORS, throttling, and access logging.

Core Features & Use Cases

  • Create REST or HTTP APIs and attach an existing Lambda function.
  • Configure Lambda proxy integration, resource/method setup, and deployment stages.
  • Enable CORS, security controls, and production hardening for reliable, scalable endpoints.
  • Use cases include exposing internal functions as public endpoints, building serverless APIs for microservices, and prototyping API-driven integrations.

Quick Start

Provide the Lambda function name, API name, region, and desired deployment parameters; I will create and connect the API Gateway to the function.

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 existing AWS Lambda function to API Gateway?

To connect an existing AWS Lambda function to API Gateway, you provide the function name, API name, region, and deployment parameters. The workflow automates resource and method setup, Lambda proxy integration, permissions configuration, and stage deployment.

What's the best way to configure Lambda proxy integration with API Gateway?

The best way to configure Lambda proxy integration is through an automated workflow that sets up the API Gateway resource and method, attaches the Lambda function, and deploys the stage. This ensures the proxy integration handles requests and responses correctly.

Can I enable CORS and throttling when exposing Lambda functions as REST APIs?

Yes, you can enable CORS and throttling when exposing Lambda functions as REST APIs. The connection workflow applies these production safeguards along with access logging and configurable authorization types to secure and harden your endpoints.

Does this API Gateway and Lambda setup support both REST and HTTP APIs?

Yes, the API Gateway and Lambda setup supports both REST and HTTP APIs. You can create either API type and attach your existing Lambda function via proxy integration, allowing you to choose the appropriate API architecture for your serverless workload.

How do I configure authorization and API keys for a serverless API endpoint?

To configure authorization and API keys for a serverless API endpoint, the workflow enforces support for configurable authorization types and optional API keys. This secures the API Gateway stage deployment and controls access to the connected Lambda function.

What production safeguards do I need when deploying Lambda functions behind API Gateway?

Production safeguards needed when deploying Lambda functions behind API Gateway include CORS, throttling, access logging, and proper error handling. The workflow configures these protections across development and production environments to ensure reliable, scalable endpoints.