aws-solutions-constructs.aws-openapigateway-lambda


Nameaws-solutions-constructs.aws-openapigateway-lambda JSON
Version 2.74.0 PyPI version JSON
download
home_pagehttps://github.com/awslabs/aws-solutions-constructs.git
SummaryCDK constructs for defining an interaction between an OpenAPI-defined API Gateway and one or more Lambda functions.
upload_time2024-10-22 18:10:01
maintainerNone
docs_urlNone
authorAmazon Web Services
requires_python~=3.8
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # aws-openapigateway-lambda module

<!--BEGIN STABILITY BANNER-->---


![Stability: Experimental](https://img.shields.io/badge/stability-Experimental-important.svg?style=for-the-badge)

---
<!--END STABILITY BANNER-->

| **Reference Documentation**:| <span style="font-weight: normal">https://docs.aws.amazon.com/solutions/latest/constructs/</span>|
|:-------------|:-------------|

<div style="height:8px"></div>

| **Language**     | **Package**        |
|:-------------|-----------------|
|![Python Logo](https://docs.aws.amazon.com/cdk/api/latest/img/python32.png) Python|`aws_solutions_constructs.aws_openapigateway_lambda`|
|![Typescript Logo](https://docs.aws.amazon.com/cdk/api/latest/img/typescript32.png) Typescript|`@aws-solutions-constructs/aws-openapigateway-lambda`|
|![Java Logo](https://docs.aws.amazon.com/cdk/api/latest/img/java32.png) Java|`software.amazon.awsconstructs.services.openapigatewaylambda`|

## Overview

This AWS Solutions Construct implements an Amazon API Gateway REST API defined by an OpenAPI specification file connected to an AWS Lambda function.

Here is a minimal deployable pattern definition.

**NOTE** The referenced `openapi/apiDefinition.yaml` openapi definition file and `messages-lambda` lambda package directory for the three code samples below can both be found under this constructs `test` folder (`<repository_root>/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test`)

Typescript

```python
import { Stack, StackProps } from 'aws-cdk-lib';
import { Construct } from 'constructs';
import { OpenApiGatewayToLambda } from '@aws-solutions-constructs/aws-openapigateway-lambda';
import { Asset } from 'aws-cdk-lib/aws-s3-assets';
import * as path from 'path';
import * as lambda from 'aws-cdk-lib/aws-lambda';

const apiDefinitionAsset = new Asset(this, 'ApiDefinitionAsset', {
  path: path.join(__dirname, 'openapi/apiDefinition.yaml')
});

new OpenApiGatewayToLambda(this, 'OpenApiGatewayToLambda', {
  apiDefinitionAsset,
  apiIntegrations: [
    {
      id: 'MessagesHandler',
      lambdaFunctionProps: {
        runtime: lambda.Runtime.NODEJS_18_X,
        handler: 'index.handler',
        code: lambda.Code.fromAsset(`${__dirname}/messages-lambda`),
      }
    }
  ]
});
```

Python

```python
from aws_cdk import (
    Stack,
    aws_s3_assets as s3_assets,
    aws_lambda as lambda_,
)
from constructs import Construct
from aws_solutions_constructs.aws_openapigateway_lambda import OpenApiGatewayToLambda, ApiIntegration

class TestStack(Stack):

    def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None:
        super().__init__(scope, construct_id, **kwargs)

        api_definition_asset = s3_assets.Asset(self, "ApiDefinitionAsset", path="./openapi/apiDefinition.yaml")

        api_integration = ApiIntegration(id="MessagesHandler", lambda_function_props={
            "runtime": lambda_.Runtime.NODEJS_18_X,
            "handler": "index.handler",
            "code": lambda_.Code.from_asset("./messages-lambda")
        })

        openapigateway_to_lambda = OpenApiGatewayToLambda(self,
            id="OpenApiGatewayToLambda",
            api_integrations=[api_integration],
            api_definition_asset=api_definition_asset
        )
```

Java

```java
import software.amazon.awscdk.services.lambda.Code;
import software.amazon.awscdk.services.lambda.FunctionProps;
import software.amazon.awscdk.services.s3.assets.Asset;
import software.amazon.awscdk.services.s3.assets.AssetProps;
import software.amazon.awsconstructs.services.openapigatewaylambda.ApiIntegration;
import software.amazon.awsconstructs.services.openapigatewaylambda.OpenApiGatewayToLambda;
import software.amazon.awsconstructs.services.openapigatewaylambda.OpenApiGatewayToLambdaProps;
import software.constructs.Construct;
import software.amazon.awscdk.Stack;
import software.amazon.awscdk.StackProps;

import java.util.Collections;

import static software.amazon.awscdk.services.lambda.Runtime.NODEJS_18_X;

final Asset apiDefinitionAsset = new Asset(this, "ApiDefinition", AssetProps.builder().path("openapi/apiDefinition.yaml").build());

final ApiIntegration apiIntegration = ApiIntegration.builder()
    .id("MessagesHandler")
    .lambdaFunctionProps(new FunctionProps.Builder()
        .runtime(NODEJS_18_X)
        .code(Code.fromAsset("messages-lambda"))
        .handler("index.handler")
        .build())
    .build();

new OpenApiGatewayToLambda(this, "OpenApiGatewayToLambda", OpenApiGatewayToLambdaProps.builder()
    .apiDefinitionAsset(apiDefinitionAsset)
    .apiIntegrations(Collections.singletonList(apiIntegration))
    .build());
```

## Pattern Construct Props

| **Name**     | **Type**        | **Description** |
|:-------------|:----------------|-----------------|
|apiGatewayProps?|[`apigateway.RestApiBaseProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.RestApiBaseProps.html)|Optional user-provided props to override the default props for the API.|
|apiDefinitionBucket?|[`s3.IBucket`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3.IBucket.html)|S3 Bucket where the OpenAPI spec file is located. When specifying this property, `apiDefinitionKey` must also be specified.|
|apiDefinitionKey?|`string`|S3 Object name of the OpenAPI spec file. When specifying this property, `apiDefinitionBucket` must also be specified.|
|apiDefinitionAsset?|[`aws_s3_assets.Asset`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3_assets.Asset.html)|Local file asset of the OpenAPI spec file.|
|apiDefinitionJson?|any|OpenAPI specification represented in a JSON object to be embedded in the CloudFormation template. IMPORTANT - Including the spec in the template introduces a risk of the template growing too big, but there are some use cases that require an embedded spec. Unless your use case explicitly requires an embedded spec you should pass your spec as an S3 asset.|
|apiIntegrations|`ApiIntegration[]`|One or more key-value pairs that contain an id for the api integration and either an existing lambda function or an instance of the LambdaProps. Please see the `Overview of how the OpenAPI file transformation works` section below for more usage details.|
|logGroupProps?|[`logs.LogGroupProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.LogGroupProps.html)|User provided props to override the default props for for the CloudWatchLogs LogGroup.|

## Pattern Properties

| **Name**     | **Type**        | **Description** |
|:-------------|:----------------|-----------------|
|apiLambdaFunctions|`ApiLambdaFunction[]`|Returns an array of ApiLambdaFunction objects, where each has an `id` of the `apiIntegration` and the corresponding `lambda.Function` that it maps to.|
|apiGateway|[`api.SpecRestApi`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.SpecRestApi.html)|Returns an instance of the API Gateway REST API created by the pattern.|
|apiGatewayCloudWatchRole?|[`iam.Role`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.Role.html)|Returns an instance of the iam.Role created by the construct for API Gateway for CloudWatch access.|
|apiGatewayLogGroup|[`logs.LogGroup`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.LogGroup.html)|Returns an instance of the LogGroup created by the construct for API Gateway access logging to CloudWatch.|

## Overview of how the OpenAPI file transformation works

This construct automatically transforms an incoming OpenAPI Definition (residing locally or in S3) by auto-populating the `uri` fields of the `x-amazon-apigateway-integration` integrations with the resolved value of the backing lambda functions. It does so by allowing the user to specify the `apiIntegrations` property and then correlates it with the api definition.

Looking at an example - a user creates an instantiation of `apiIntegrations` that specifies one integration named `MessagesHandler` that passes in a set of `lambda.FunctionProps` and a second integration named `PhotosHandler` that passes in an existing `lambda.Function`:

```python
const apiIntegrations: ApiIntegration[] = [
  {
    id: 'MessagesHandler',
    lambdaFunctionProps: {
      runtime: lambda.Runtime.NODEJS_18_X,
      handler: 'index.handler',
      code: lambda.Code.fromAsset(`${__dirname}/messages-lambda`),
    }
  },
  {
    id: 'PhotosHandler',
    existingLambdaObj: new lambda.Function(this, 'PhotosLambda', {
      runtime: lambda.Runtime.NODEJS_18_X,
      handler: 'index.handler',
      code: lambda.Code.fromAsset(`${__dirname}/photos-lambda`),
    })
  }
]
```

And a corresponding api definition with `GET` and `POST` methods on a `/messages` resource and a `GET` method on a `/photos` resource.

```
openapi: "3.0.1"
info:
  title: "api"
  version: "2023-02-20T20:46:08Z"
paths:
  /messages:
    get:
      x-amazon-apigateway-integration:
        httpMethod: "POST"
        uri: MessagesHandler
        passthroughBehavior: "when_no_match"
        type: "aws_proxy"
    post:
      x-amazon-apigateway-integration:
        httpMethod: "POST"
        uri: MessagesHandler
        passthroughBehavior: "when_no_match"
        type: "aws_proxy"
  /photos:
    get:
      x-amazon-apigateway-integration:
        httpMethod: "POST"
        uri: PhotosHandler
        passthroughBehavior: "when_no_match"
        type: "aws_proxy"
```

When the construct is created or updated, it will overwrite the `MessagesHandler` string with the fully resolved lambda proxy uri of the `MessagesHandlerLambdaFunction`, e.g., `arn:${Aws.PARTITION}:apigateway:${Aws.REGION}:lambda:path/2015-03-31/functions/${messagesLambda.functionArn}/invocations`, and similarly for the `PhotosHandler` string and `PhotosHandlerLambdaFunction`, resulting in a valid OpenAPI spec file that is then passed to the `SpecRestApi` construct.

For more information on specifying an API with OpenAPI, please see the [OpenAPI Specification](https://spec.openapis.org/oas/latest.html)

## ApiIntegration Details

This construct defines a custom type, `ApiIntegration`, that is specified as a required prop. The type has a required property, `id`, and two optional properties `existingLambdaObj` and `lambdaFunctionProps`. The `id` property is used to map the corresponding lambda function being defined with the placeholder string in the OpenAPI template file, and is not a CDK construct ID. Exactly one of `existingLambdaObj` or `lambdaFunctionProps` must be specified or the construct will throw an error.

## Default settings

Out of the box implementation of the Construct without any override will set the following defaults:

### Amazon API Gateway

* Deploy an edge-optimized API endpoint
* Enable CloudWatch logging for API Gateway
* Configure least privilege access IAM role for API Gateway
* Enable X-Ray Tracing

### AWS Lambda Function

* Configure limited privilege access IAM roles for Lambda functions
* Enable reusing connections with Keep-Alive for NodeJs Lambda functions
* Enable X-Ray Tracing
* Set Environment Variables

  * AWS_NODEJS_CONNECTION_REUSE_ENABLED (for Node 10.x and higher functions)

## Architecture

![Architecture Diagram](architecture.png)

---


© Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/awslabs/aws-solutions-constructs.git",
    "name": "aws-solutions-constructs.aws-openapigateway-lambda",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "~=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "Amazon Web Services",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/56/8a/e071731fbdf2c8d7e9a9a616a2b097964a02d308afee571624b00079c0cb/aws_solutions_constructs_aws_openapigateway_lambda-2.74.0.tar.gz",
    "platform": null,
    "description": "# aws-openapigateway-lambda module\n\n<!--BEGIN STABILITY BANNER-->---\n\n\n![Stability: Experimental](https://img.shields.io/badge/stability-Experimental-important.svg?style=for-the-badge)\n\n---\n<!--END STABILITY BANNER-->\n\n| **Reference Documentation**:| <span style=\"font-weight: normal\">https://docs.aws.amazon.com/solutions/latest/constructs/</span>|\n|:-------------|:-------------|\n\n<div style=\"height:8px\"></div>\n\n| **Language**     | **Package**        |\n|:-------------|-----------------|\n|![Python Logo](https://docs.aws.amazon.com/cdk/api/latest/img/python32.png) Python|`aws_solutions_constructs.aws_openapigateway_lambda`|\n|![Typescript Logo](https://docs.aws.amazon.com/cdk/api/latest/img/typescript32.png) Typescript|`@aws-solutions-constructs/aws-openapigateway-lambda`|\n|![Java Logo](https://docs.aws.amazon.com/cdk/api/latest/img/java32.png) Java|`software.amazon.awsconstructs.services.openapigatewaylambda`|\n\n## Overview\n\nThis AWS Solutions Construct implements an Amazon API Gateway REST API defined by an OpenAPI specification file connected to an AWS Lambda function.\n\nHere is a minimal deployable pattern definition.\n\n**NOTE** The referenced `openapi/apiDefinition.yaml` openapi definition file and `messages-lambda` lambda package directory for the three code samples below can both be found under this constructs `test` folder (`<repository_root>/source/patterns/@aws-solutions-constructs/aws-openapigateway-lambda/test`)\n\nTypescript\n\n```python\nimport { Stack, StackProps } from 'aws-cdk-lib';\nimport { Construct } from 'constructs';\nimport { OpenApiGatewayToLambda } from '@aws-solutions-constructs/aws-openapigateway-lambda';\nimport { Asset } from 'aws-cdk-lib/aws-s3-assets';\nimport * as path from 'path';\nimport * as lambda from 'aws-cdk-lib/aws-lambda';\n\nconst apiDefinitionAsset = new Asset(this, 'ApiDefinitionAsset', {\n  path: path.join(__dirname, 'openapi/apiDefinition.yaml')\n});\n\nnew OpenApiGatewayToLambda(this, 'OpenApiGatewayToLambda', {\n  apiDefinitionAsset,\n  apiIntegrations: [\n    {\n      id: 'MessagesHandler',\n      lambdaFunctionProps: {\n        runtime: lambda.Runtime.NODEJS_18_X,\n        handler: 'index.handler',\n        code: lambda.Code.fromAsset(`${__dirname}/messages-lambda`),\n      }\n    }\n  ]\n});\n```\n\nPython\n\n```python\nfrom aws_cdk import (\n    Stack,\n    aws_s3_assets as s3_assets,\n    aws_lambda as lambda_,\n)\nfrom constructs import Construct\nfrom aws_solutions_constructs.aws_openapigateway_lambda import OpenApiGatewayToLambda, ApiIntegration\n\nclass TestStack(Stack):\n\n    def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None:\n        super().__init__(scope, construct_id, **kwargs)\n\n        api_definition_asset = s3_assets.Asset(self, \"ApiDefinitionAsset\", path=\"./openapi/apiDefinition.yaml\")\n\n        api_integration = ApiIntegration(id=\"MessagesHandler\", lambda_function_props={\n            \"runtime\": lambda_.Runtime.NODEJS_18_X,\n            \"handler\": \"index.handler\",\n            \"code\": lambda_.Code.from_asset(\"./messages-lambda\")\n        })\n\n        openapigateway_to_lambda = OpenApiGatewayToLambda(self,\n            id=\"OpenApiGatewayToLambda\",\n            api_integrations=[api_integration],\n            api_definition_asset=api_definition_asset\n        )\n```\n\nJava\n\n```java\nimport software.amazon.awscdk.services.lambda.Code;\nimport software.amazon.awscdk.services.lambda.FunctionProps;\nimport software.amazon.awscdk.services.s3.assets.Asset;\nimport software.amazon.awscdk.services.s3.assets.AssetProps;\nimport software.amazon.awsconstructs.services.openapigatewaylambda.ApiIntegration;\nimport software.amazon.awsconstructs.services.openapigatewaylambda.OpenApiGatewayToLambda;\nimport software.amazon.awsconstructs.services.openapigatewaylambda.OpenApiGatewayToLambdaProps;\nimport software.constructs.Construct;\nimport software.amazon.awscdk.Stack;\nimport software.amazon.awscdk.StackProps;\n\nimport java.util.Collections;\n\nimport static software.amazon.awscdk.services.lambda.Runtime.NODEJS_18_X;\n\nfinal Asset apiDefinitionAsset = new Asset(this, \"ApiDefinition\", AssetProps.builder().path(\"openapi/apiDefinition.yaml\").build());\n\nfinal ApiIntegration apiIntegration = ApiIntegration.builder()\n    .id(\"MessagesHandler\")\n    .lambdaFunctionProps(new FunctionProps.Builder()\n        .runtime(NODEJS_18_X)\n        .code(Code.fromAsset(\"messages-lambda\"))\n        .handler(\"index.handler\")\n        .build())\n    .build();\n\nnew OpenApiGatewayToLambda(this, \"OpenApiGatewayToLambda\", OpenApiGatewayToLambdaProps.builder()\n    .apiDefinitionAsset(apiDefinitionAsset)\n    .apiIntegrations(Collections.singletonList(apiIntegration))\n    .build());\n```\n\n## Pattern Construct Props\n\n| **Name**     | **Type**        | **Description** |\n|:-------------|:----------------|-----------------|\n|apiGatewayProps?|[`apigateway.RestApiBaseProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.RestApiBaseProps.html)|Optional user-provided props to override the default props for the API.|\n|apiDefinitionBucket?|[`s3.IBucket`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3.IBucket.html)|S3 Bucket where the OpenAPI spec file is located. When specifying this property, `apiDefinitionKey` must also be specified.|\n|apiDefinitionKey?|`string`|S3 Object name of the OpenAPI spec file. When specifying this property, `apiDefinitionBucket` must also be specified.|\n|apiDefinitionAsset?|[`aws_s3_assets.Asset`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3_assets.Asset.html)|Local file asset of the OpenAPI spec file.|\n|apiDefinitionJson?|any|OpenAPI specification represented in a JSON object to be embedded in the CloudFormation template. IMPORTANT - Including the spec in the template introduces a risk of the template growing too big, but there are some use cases that require an embedded spec. Unless your use case explicitly requires an embedded spec you should pass your spec as an S3 asset.|\n|apiIntegrations|`ApiIntegration[]`|One or more key-value pairs that contain an id for the api integration and either an existing lambda function or an instance of the LambdaProps. Please see the `Overview of how the OpenAPI file transformation works` section below for more usage details.|\n|logGroupProps?|[`logs.LogGroupProps`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.LogGroupProps.html)|User provided props to override the default props for for the CloudWatchLogs LogGroup.|\n\n## Pattern Properties\n\n| **Name**     | **Type**        | **Description** |\n|:-------------|:----------------|-----------------|\n|apiLambdaFunctions|`ApiLambdaFunction[]`|Returns an array of ApiLambdaFunction objects, where each has an `id` of the `apiIntegration` and the corresponding `lambda.Function` that it maps to.|\n|apiGateway|[`api.SpecRestApi`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.SpecRestApi.html)|Returns an instance of the API Gateway REST API created by the pattern.|\n|apiGatewayCloudWatchRole?|[`iam.Role`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.Role.html)|Returns an instance of the iam.Role created by the construct for API Gateway for CloudWatch access.|\n|apiGatewayLogGroup|[`logs.LogGroup`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_logs.LogGroup.html)|Returns an instance of the LogGroup created by the construct for API Gateway access logging to CloudWatch.|\n\n## Overview of how the OpenAPI file transformation works\n\nThis construct automatically transforms an incoming OpenAPI Definition (residing locally or in S3) by auto-populating the `uri` fields of the `x-amazon-apigateway-integration` integrations with the resolved value of the backing lambda functions. It does so by allowing the user to specify the `apiIntegrations` property and then correlates it with the api definition.\n\nLooking at an example - a user creates an instantiation of `apiIntegrations` that specifies one integration named `MessagesHandler` that passes in a set of `lambda.FunctionProps` and a second integration named `PhotosHandler` that passes in an existing `lambda.Function`:\n\n```python\nconst apiIntegrations: ApiIntegration[] = [\n  {\n    id: 'MessagesHandler',\n    lambdaFunctionProps: {\n      runtime: lambda.Runtime.NODEJS_18_X,\n      handler: 'index.handler',\n      code: lambda.Code.fromAsset(`${__dirname}/messages-lambda`),\n    }\n  },\n  {\n    id: 'PhotosHandler',\n    existingLambdaObj: new lambda.Function(this, 'PhotosLambda', {\n      runtime: lambda.Runtime.NODEJS_18_X,\n      handler: 'index.handler',\n      code: lambda.Code.fromAsset(`${__dirname}/photos-lambda`),\n    })\n  }\n]\n```\n\nAnd a corresponding api definition with `GET` and `POST` methods on a `/messages` resource and a `GET` method on a `/photos` resource.\n\n```\nopenapi: \"3.0.1\"\ninfo:\n  title: \"api\"\n  version: \"2023-02-20T20:46:08Z\"\npaths:\n  /messages:\n    get:\n      x-amazon-apigateway-integration:\n        httpMethod: \"POST\"\n        uri: MessagesHandler\n        passthroughBehavior: \"when_no_match\"\n        type: \"aws_proxy\"\n    post:\n      x-amazon-apigateway-integration:\n        httpMethod: \"POST\"\n        uri: MessagesHandler\n        passthroughBehavior: \"when_no_match\"\n        type: \"aws_proxy\"\n  /photos:\n    get:\n      x-amazon-apigateway-integration:\n        httpMethod: \"POST\"\n        uri: PhotosHandler\n        passthroughBehavior: \"when_no_match\"\n        type: \"aws_proxy\"\n```\n\nWhen the construct is created or updated, it will overwrite the `MessagesHandler` string with the fully resolved lambda proxy uri of the `MessagesHandlerLambdaFunction`, e.g., `arn:${Aws.PARTITION}:apigateway:${Aws.REGION}:lambda:path/2015-03-31/functions/${messagesLambda.functionArn}/invocations`, and similarly for the `PhotosHandler` string and `PhotosHandlerLambdaFunction`, resulting in a valid OpenAPI spec file that is then passed to the `SpecRestApi` construct.\n\nFor more information on specifying an API with OpenAPI, please see the [OpenAPI Specification](https://spec.openapis.org/oas/latest.html)\n\n## ApiIntegration Details\n\nThis construct defines a custom type, `ApiIntegration`, that is specified as a required prop. The type has a required property, `id`, and two optional properties `existingLambdaObj` and `lambdaFunctionProps`. The `id` property is used to map the corresponding lambda function being defined with the placeholder string in the OpenAPI template file, and is not a CDK construct ID. Exactly one of `existingLambdaObj` or `lambdaFunctionProps` must be specified or the construct will throw an error.\n\n## Default settings\n\nOut of the box implementation of the Construct without any override will set the following defaults:\n\n### Amazon API Gateway\n\n* Deploy an edge-optimized API endpoint\n* Enable CloudWatch logging for API Gateway\n* Configure least privilege access IAM role for API Gateway\n* Enable X-Ray Tracing\n\n### AWS Lambda Function\n\n* Configure limited privilege access IAM roles for Lambda functions\n* Enable reusing connections with Keep-Alive for NodeJs Lambda functions\n* Enable X-Ray Tracing\n* Set Environment Variables\n\n  * AWS_NODEJS_CONNECTION_REUSE_ENABLED (for Node 10.x and higher functions)\n\n## Architecture\n\n![Architecture Diagram](architecture.png)\n\n---\n\n\n\u00a9 Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "CDK constructs for defining an interaction between an OpenAPI-defined API Gateway and one or more Lambda functions.",
    "version": "2.74.0",
    "project_urls": {
        "Homepage": "https://github.com/awslabs/aws-solutions-constructs.git",
        "Source": "https://github.com/awslabs/aws-solutions-constructs.git"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "eba9a03af1c94c8ab30cadf9b186aafb4f195b197ea9e16b7e38dd1e2e6ac51c",
                "md5": "3c629d9df55f41f0ae8301de8af34362",
                "sha256": "6276f2277f6d6966209f1d36e1df0a482ee3f93ba28d43167bf1e4dd7912a18b"
            },
            "downloads": -1,
            "filename": "aws_solutions_constructs.aws_openapigateway_lambda-2.74.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3c629d9df55f41f0ae8301de8af34362",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "~=3.8",
            "size": 138322,
            "upload_time": "2024-10-22T18:08:36",
            "upload_time_iso_8601": "2024-10-22T18:08:36.334757Z",
            "url": "https://files.pythonhosted.org/packages/eb/a9/a03af1c94c8ab30cadf9b186aafb4f195b197ea9e16b7e38dd1e2e6ac51c/aws_solutions_constructs.aws_openapigateway_lambda-2.74.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "568ae071731fbdf2c8d7e9a9a616a2b097964a02d308afee571624b00079c0cb",
                "md5": "deb7d3abf96f2b3bd19138e897513745",
                "sha256": "5edd7632422f88e1ccd33d2304661d8b711e83cc4a0379a86046bacdee9c2e8b"
            },
            "downloads": -1,
            "filename": "aws_solutions_constructs_aws_openapigateway_lambda-2.74.0.tar.gz",
            "has_sig": false,
            "md5_digest": "deb7d3abf96f2b3bd19138e897513745",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "~=3.8",
            "size": 140418,
            "upload_time": "2024-10-22T18:10:01",
            "upload_time_iso_8601": "2024-10-22T18:10:01.340828Z",
            "url": "https://files.pythonhosted.org/packages/56/8a/e071731fbdf2c8d7e9a9a616a2b097964a02d308afee571624b00079c0cb/aws_solutions_constructs_aws_openapigateway_lambda-2.74.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-22 18:10:01",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "awslabs",
    "github_project": "aws-solutions-constructs",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "aws-solutions-constructs.aws-openapigateway-lambda"
}
        
Elapsed time: 0.66145s