Skip to main content

Constructs for creating an API Gateway and Routes from input JSON configuration

Project description

API Gateway Construct

This package provides a construct for AWS Cloud Development Kit (CDK) to create an API Gateway with dynamic routes and methods based on a configuration.

Features

  • Creates an API Gateway with a custom name and description.
  • Dynamically creates resources and methods based on a provided configuration.
  • Supports Lambda integrations.

Installation

To install this package, run the following command in your terminal:

pip install dscdk.apigateway

Usage

from aws_cdk import App
from apigateway_construct import ApiGatewayStack

app = App()

lambda_stack = ...  # Your Lambda stack

config = {
    'routes': [
        {
            'path': '/myresource',
            'methods': ['GET'],
            'integration': 'lambda',
            'lambdaFunctionName': 'MyFunction',
        },
        # Add more routes as needed
    ],
}

ApiGatewayStack(app, "ApiGatewayStack", lambda_stack=lambda_stack, config=config)

app.synth()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

org-ds-cdk-0.1.5.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

org_ds_cdk-0.1.5-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file org-ds-cdk-0.1.5.tar.gz.

File metadata

  • Download URL: org-ds-cdk-0.1.5.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.0rc1

File hashes

Hashes for org-ds-cdk-0.1.5.tar.gz
Algorithm Hash digest
SHA256 fb54608ddd31078ec63344f438cb7b02957eb34e573bd6d05d9cd8428d12cd54
MD5 0b10a00b50943a8ecf79a155c66a0e02
BLAKE2b-256 c37d3d52adb3f022da49b6b8de83efb3f12524ad3baa68c4ee120e039533c241

See more details on using hashes here.

File details

Details for the file org_ds_cdk-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: org_ds_cdk-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.0rc1

File hashes

Hashes for org_ds_cdk-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 47336aa70be59fd2d5241779656c0c7910eb68bc1f6fd665bc8ffdb84225cc7e
MD5 23d8f98815fddd2ed330bb13a6b6041e
BLAKE2b-256 7abbcd76b625fa7e84da45485004fa744beef9469712c15858a001d59543eeb9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page