its affiliates. All rights reserved. API Gateway を IaC 管理する要素(実装イメージ) 26 API 定義 AWS CDK paths: "/users": get: description: get users parameters: - name: name in: query required: false schema: type: string default: "World" responses: "200": content: "application/json": schema: $ref: "#/components/schemas/UsersResponse" x-amazon-apigateway-integration: type: "aws_proxy" httpMethod: "POST" uri: "arn:aws:apigateway:ap-northeast-1:lambda:path/2015-03- 31/functions/<Function Arn>/invocations" const fn = new lambda.Function(this, ”Lambda", { runtime: lambda.Runtime.NODEJS_20_X, code: lambda.Code.fromAsset("lambda"), handler: "index.handler", }); const api = new apigateway.SpecRestApi(this, "users-api", { apiDefinition: apigateway.ApiDefinition.fromAsset("path-to-file.json"), }); API Gateway 配下に接続するリソース(AWS Lambda など)を宣言する が、実際は CDK で定義した Lambda を参照させたい