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
Release history Release notifications | RSS feed
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.6.tar.gz
(2.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file org-ds-cdk-0.1.6.tar.gz.
File metadata
- Download URL: org-ds-cdk-0.1.6.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5708d6484c283753bce38b04ec7589aa85fa5465e6b0c67167cb52211442e5ff
|
|
| MD5 |
c238a4225284c7d41b25f163417b1cae
|
|
| BLAKE2b-256 |
364e99c47a53f5e261e971f195be217c802b811e80bb9a121a08f7dfbda830c6
|
File details
Details for the file org_ds_cdk-0.1.6-py3-none-any.whl.
File metadata
- Download URL: org_ds_cdk-0.1.6-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.0rc1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d125160d4faaf27929d093b14661f6718c6bc867f1c5a8536d34cd85a789dbba
|
|
| MD5 |
8862ecf167e8e55dc36e5c76cb20fef9
|
|
| BLAKE2b-256 |
a3eca146ad3583042f539fd884f5d2ea285845bb2c9a2249e899e10b0c0fb876
|