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 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.1.tar.gz (55.2 kB view details)

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for cdk_vpc_endpoint_with_private_ip-0.0.1.tar.gz
Algorithm Hash digest
SHA256 e489940ca5ae974562c6f64061670583980cf74fb9ceeb8c5b0331cdf511efcf
MD5 9c093fd8fa875bde629eb66ced5ad6c9
BLAKE2b-256 87e31809acb475ed52161269cb43001b0491c5129af126157724576f1ad7dd7b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cdk_vpc_endpoint_with_private_ip-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f981254f66a4b9d0aebe95e03f5372e67c4707a7940deb30a43c876f79475b9f
MD5 ee9b100cbb8cc988739a9b0fb14fae31
BLAKE2b-256 ab03cb500f8732b04086d9d4c8bf857a01d2aef74e7969c56214886422786ddb

See more details on using hashes here.

Supported by

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