@proxylity/cdk-udp-gateway
L1 (CloudFormation-faithful) AWS CDK construct library for the Proxylity UDP Gateway custom resources. Build event-driven UDP/WireGuard/DTLS/WebRTC datagram services on AWS without operating listener servers.
This is the L1 layer: thin, un-opinionated, 1:1 wrappers of the Proxylity UDP Gateway
CloudFormation custom resources. Each construct emits exactly one Custom::ProxylityUdpGateway*
resource with the property keys the service reads, in the PascalCase shape it expects on the wire.
L1 adds no derived IAM, no invented enums, and no defaults beyond what the resource itself applies.
You must be subscribed to Proxylity UDP Gateway in AWS Marketplace to deploy stacks that use these constructs.
Install
| Language | Package |
|---|---|
| TypeScript / JavaScript | npm install @proxylity/cdk-udp-gateway |
| Python | pip install proxylity-cdk-udp-gateway (module proxylity_cdk_udp_gateway) |
| .NET | dotnet add package Proxylity.CDK.UdpGateway |
| Java | Maven com.proxylity:cdk-udp-gateway (package com.proxylity.cdk.udpgateway) |
| Go | go get github.com/proxylity/cdk-udp-gateway |
Peer dependencies: aws-cdk-lib@^2.160.0 and constructs@^10.0.0.
Resources
| Construct | CloudFormation type | Notes |
|---|---|---|
CfnListener |
Custom::ProxylityUdpGatewayListener |
The main resource. Inline destinations live in destinations. |
CfnDestinationArn |
Custom::ProxylityUdpGatewayDestinationArn |
Registers one ARN for one destination in one ingress region. |
CfnPacketSource |
Custom::ProxylityUdpGatewayPacketSource |
Subscribes a listener to an SNS topic for server-initiated push. |
ProxylityConfig |
(helper, not a resource) | Injects the account/region config mapping and resolves ServiceToken/ServiceRole/ApiKey. |
A standalone top-level destination resource is not shipped: destinations are created inline via
CfnListener.destinations.
Usage
Every Proxylity stack begins by materializing the account/region configuration mapping with
ProxylityConfig, then uses its accessors to resolve the ServiceToken and ApiKey for each
resource. ProxylityConfig.forStack is idempotent — the Mappings.ProxylityConfig block is emitted
exactly once per stack.
The example below reproduces the packet-counter example stack: a udp listener restricted to a
caller-supplied CIDR, with one inline Lambda destination.
import { App, CfnParameter, CfnOutput, Fn, Stack, StackProps } from 'aws-cdk-lib';
import * as lambda from 'aws-cdk-lib/aws-lambda';
import * as iam from 'aws-cdk-lib/aws-iam';
import { Construct } from 'constructs';
import { ProxylityConfig, CfnListener } from '@proxylity/cdk-udp-gateway';
class PacketCounterStack extends Stack {
constructor(scope: Construct, id: string, props?: StackProps) {
super(scope, id, props);
const clientCidr = new CfnParameter(this, 'ClientCidrToAllow', {
type: 'String',
default: '0.0.0.0/0',
});
const config = ProxylityConfig.forStack(this);
const fn = new lambda.Function(this, 'PacketCounterLambda', {
runtime: lambda.Runtime.NODEJS_22_X,
handler: 'index.handler',
code: lambda.Code.fromInline('exports.handler = async (e) => ({ Replies: [] });'),
});
// The destination role trusts the Proxylity ServiceRole (not lambda.amazonaws.com).
const role = new iam.Role(this, 'DestinationRole', {
assumedBy: new iam.ArnPrincipal(config.serviceRole()),
});
fn.grantInvoke(role);
const listener = new CfnListener(this, 'UdpListener', {
serviceToken: config.serviceToken(),
apiKey: config.apiKey(),
protocols: ['udp'],
clientRestrictions: { networks: [clientCidr.valueAsString] },
destinations: [
{
description: 'Delivers to the packet counter lambda.',
role: { arn: role.roleArn },
batching: { count: 1000, timeoutInSeconds: 1 },
metricsEnabled: true,
destinationArn: fn.functionArn,
},
],
});
new CfnOutput(this, 'Endpoint', {
value: Fn.sub('${Domain}.proxylity.com:${Port}', {
Domain: listener.attrDomain,
Port: listener.attrPort,
}),
});
}
}
const app = new App();
new PacketCounterStack(app, 'PacketCounter');
Outputs
CfnListener exposes listener outputs as Fn::GetAtt tokens: attrId, attrPort, attrDomain,
and the string-list attrDestinationNames, plus protocol-specific getters
(attrWireGuardPublicKey; attrDtlsServerCertificate; attrWebRtcFingerprint, attrWebRtcSctpPort,
attrWebRtcChannelId, attrWebRtcSignalingMode, attrWebRtcSignalingToken, attrWebRtcSignalingUrl).
Numeric values (attrPort, attrWebRtcSctpPort, attrWebRtcChannelId) are returned as string
tokens; wrap with Token.asNumber(...) if you need a number.
Protocols
protocols must contain exactly one of udp, wg, dtls, or webrtc. Protocol-specific
properties are optional members on CfnListenerProps; the service rejects invalid cross-protocol
combinations. See the JSDoc on each property for its behavior.
Fidelity
L1 is faithful to the service: if the resource accepts an input, L1 emits it; if the resource
rejects it, the stack event explains why. L1 performs only one client-side check — an inline
destination may not set both destinationArn and destinationArnMap (both map to the single
DestinationArn wire key). Everything else (CIDR/ARN/base64 formats, name regex, enum membership,
numeric ranges, cross-field requirements) is left to the resource.
Metadata
Release files for proxylity-cdk-udp-gateway 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| proxylity_cdk_udp_gateway-0.2.1.tar.gz | 195.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| proxylity_cdk_udp_gateway-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 389.5 kB
Release files / proxylity_cdk_udp_gateway-0.2.1.tar.gz
| Download URL | proxylity_cdk_udp_gateway-0.2.1.tar.gz |
|---|---|
| Size | 195.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
80973a5a04b223a90a1e20cf28149d82e0da5fa4eef7ff46835ad92fc160f957
|
|
BLAKE2b-256 checksum How to use checksums |
c51b0c673c467421bbc531e30c63133ddf83451c8b38c9da18d912b6b2629481
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.
Transparency logRelease files / proxylity_cdk_udp_gateway-0.2.1-py3-none-any.whl
| Download URL | proxylity_cdk_udp_gateway-0.2.1-py3-none-any.whl |
|---|---|
| Size | 194.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fd0f7ff456c630ea15ccec2526937eb372920998c724b381ada465388a958c14
|
|
BLAKE2b-256 checksum How to use checksums |
bb970c72f0643d64670e22809b2e92b48d43e254c579a3a7c4154d358d39aec4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.
Transparency log