Integrations for AWS APIGateway V2
Project description
AWS APIGatewayv2 Integrations
---The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the Semantic Versioning model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.
Table of Contents
Introduction
Integrations connect a route to backend resources. HTTP APIs support Lambda proxy, AWS service, and HTTP proxy integrations. HTTP proxy integrations are also known as private integrations.
Currently the following integrations are supported by this construct library.
Private Integration
Private integrations enable integrating an HTTP API route with private resources in a VPC, such as Application Load Balancers or Amazon ECS container-based applications. Using private integrations, resources in a VPC can be exposed for access by clients outside of the VPC.
The following integrations are supported for private resources in a VPC.
Application Load Balancer
The following code is a basic application load balancer private integration of HTTP API:
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
vpc = ec2.Vpc(stack, "VPC")
lb = elbv2.ALB(stack, "lb", vpc=vpc)
listener = lb.add_listener("listener", port=80)
listener.add_targets("target",
port=80
)
http_endpoint = HttpApi(stack, "HttpProxyPrivateApi",
default_integration=HttpAlbIntegrationProps(
listener=listener
)
)
Network Load Balancer
The following code is a basic network load balancer private integration of HTTP API:
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
vpc = ec2.Vpc(stack, "VPC")
lb = elbv2.NLB(stack, "lb", vpc=vpc)
listener = lb.add_listener("listener", port=80)
listener.add_targets("target",
port=80
)
http_endpoint = HttpApi(stack, "HttpProxyPrivateApi",
default_integration=HttpNlbIntegrationProps(
listener=listener
)
)
Cloud Map Service Discovery
The following code is a basic discovery service private integration of HTTP API:
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
vpc = ec2.Vpc(stack, "VPC")
vpc_link = VpcLink(stack, "VpcLink", vpc=vpc)
namespace = servicediscovery.PrivateDnsNamespace(stack, "Namespace",
name="boobar.com",
vpc=vpc
)
service = namespace.create_service("Service")
http_endpoint = HttpApi(stack, "HttpProxyPrivateApi",
default_integration=HttpServiceDiscoveryIntegration(
vpc_link=vpc_link,
service=service
)
)
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
Built Distribution
Hashes for aws-cdk.aws-apigatewayv2-integrations-1.72.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c981cb709df7281939b87178a64aee5a83cc4e829937d23dfd4cafb7930ef26c |
|
MD5 | c908b0b3ebd63d9fbe9e4124fc147f0f |
|
BLAKE2b-256 | dd9e644ec3189e31ce54637d82a6ef007619c17d45354a7a628b3a030c16ca32 |
Hashes for aws_cdk.aws_apigatewayv2_integrations-1.72.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4c84515ece0833ed4653031e160dfca1e4a7fcab77d9a9de1d2552384eb629e |
|
MD5 | 4e36d9f5677056510b1e55d801426dab |
|
BLAKE2b-256 | 986f3897fe4fee2f12d3a30ca2fdca4c3a2625550b4c03c854669bd7ab5e9fb4 |