connecting-lambda-to-api-gateway

द्वारा aws

मौजूदा AWS Lambda फ़ंक्शन को Amazon API Gateway से जोड़ता है, REST या HTTP API को resource/method सेटअप, Lambda proxy integration, … के साथ बनाकर।

npx skills add https://github.com/aws/agent-toolkit-for-aws --skill connecting-lambda-to-api-gateway

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.

aws की और Skills

agents-build
aws
Use to extend an existing agent project with memory, app integration, VPC, multi-agent, migration, model, browser, code interpreter, payments, or resource…
official
agents-connect
aws
अपने एजेंट को Gateway के माध्यम से बाहरी APIs, टूल्स, या सेवाओं से जोड़ते समय, या Cedar नीतियों के साथ टूल एक्सेस प्रतिबंधित करते समय उपयोग करें। Gateway सेटअप, लक्ष्य…
official
agents-debug
aws
इसका उपयोग तब करें जब आपका एजेंट या वातावरण खराब हो — गलत उत्तर, त्रुटियाँ, टाइमआउट, टूल विफलताएँ, या CLI समस्याएँ। मूल कारणों का निदान करने के लिए ट्रेस और लॉग पढ़ता है।…
official
agents-deploy
aws
Use when deploying your agent to AWS, or when a deploy has failed. Handles pre-flight validation, CDK/IAM/quota error diagnosis, version management, rollback,…
official
agents-get-started
aws
Use when a developer wants to create a new agent project or get started with AgentCore. Handles framework selection, project scaffolding, first deploy, and…
official
agents-harden
aws
अपने एजेंट को प्रोडक्शन के लिए तैयार करते समय उपयोग करें — IAM स्कोपिंग, इनबाउंड प्रमाणीकरण (JWT, SigV4), सीक्रेट्स प्रबंधन, कोल्ड स्टार्ट अनुकूलन, सत्र जीवनचक्र, दर…
official
agents-pay
aws
Use when THIS agent needs to pay for x402-protected content at runtime: hitting a paywall mid-task, settling it via AgentCore Payments, and applying…
official
amazon-aurora-mysql
aws
Amazon Aurora MySQL — विशेष रूप से Aurora MySQL क्लस्टर बनाता, संशोधित करता और उन पर सलाह देता है (MySQL-संगत इंजन, Aurora serverless, parallel query)।…
official