Skip to main content

CDK Construct for a VPC Endpoint with private IPs

Project description

Interface VPC Endpoint with Private IP

This is a CDK construct that retrieves the private IP address of an Interface VPC Endpoint:

View on Construct Hub Open in Visual Studio Code npm version Build Status Release Status License npm downloads

Architecture

Architecture

Installation

npm install cdk-vpc-endpoint-with-private-ip

Usage

You can create an interface VPC endpoint and retrive its private IP addresses using the VpcEndpointWithPrivateIp construct.

The ec2.InterfaceVpcEndpointProps can be passed to the construct to configure the interface VPC endpoint.

import { InterfaceVpcEndpointWithPrivateIp } from 'cdk-vpc-endpoint-with-private-ip';
import * as ec2 from 'aws-cdk-lib/aws-ec2';

declare const vpc: ec2.IVpc;

const endpoint = new InterfaceVpcEndpointWithPrivateIp(this, 'Endpoint', {
  vpc,
  service: ec2.InterfaceVpcEndpointAwsService.S3,
});

const privateIps = endpoint.privateIps;

Note: privateIps is an array of CDK Tokens, and the actual IP addresses are not determined until the stack is deployed.

Special Thanks

I am greatly referencing the content of this post.

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

cdk_vpc_endpoint_with_private_ip-0.0.5.tar.gz (55.2 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file cdk_vpc_endpoint_with_private_ip-0.0.5.tar.gz.

File metadata

File hashes

Hashes for cdk_vpc_endpoint_with_private_ip-0.0.5.tar.gz
Algorithm Hash digest
SHA256 2bc77e98ef3de19ad86dc51a507e02b257e5595ec3f61d3b309b1d8a706bad20
MD5 3ff2cd540ee4a076a915e01326666e5e
BLAKE2b-256 949b04e18868c0e0ec21d01ee963fa6792dc1e899c4f2f8d0f1d1685466774eb

See more details on using hashes here.

File details

Details for the file cdk_vpc_endpoint_with_private_ip-0.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for cdk_vpc_endpoint_with_private_ip-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 bc78a23abb91160a32e8a2c854a0090f3828ad41ee97ab2c9b70406f496b8e02
MD5 ba55643e6d59d6c19ff367f3d10114a1
BLAKE2b-256 bf04a319b76180278fb284a2a0402ab62d24cd05e7ac3d7a1c83c0985b712b94

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