Terminal
Terminal/Skill
Creates a REST or HTTP API that routes requests to an existing Lambda function, with permissions, CORS, throttling, and deployment set up.
By Amazon Web Services
Works with
npx skills add aws/agent-toolkit-for-aws --skill connecting-lambda-to-api-gatewayDomain 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.
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.
The Lambda function must return a proxy-compatible response with statusCode,
headers, and a stringified body. See the full procedure for format details.
Ensure lambda:InvokeFunction permission was added with the correct API Gateway
source ARN. See the full procedure for details.
Verify enable_cors was set to true, the OPTIONS method was created, and CORS
headers are configured in both method and integration responses.