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.8.tar.gz (56.5 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.8.tar.gz.

File metadata

File hashes

Hashes for cdk_vpc_endpoint_with_private_ip-0.0.8.tar.gz
Algorithm Hash digest
SHA256 7afb9b350f3ea03820daad681e2d5e5f1d077970835a6b524eb09d606291cd19
MD5 77091ca1184c8df8f21ce10c644394c2
BLAKE2b-256 1702750824566c7dead816b7a540873571558fbd024e3131426651d64a0cdc5f

See more details on using hashes here.

Provenance

The following attestation bundles were made for cdk_vpc_endpoint_with_private_ip-0.0.8.tar.gz:

Publisher: release.yml on badmintoncryer/cdk-vpc-endpoint-with-private-ip

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for cdk_vpc_endpoint_with_private_ip-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 e5654acd00157fa58b8b9da732cd83495c76dd27d9e844f525c86e534cc61cd6
MD5 2fa16ac6cfaad20a1c866583a23b9640
BLAKE2b-256 fcbe2f7a9ed57601ba3fbc47c843b15378737f014caa9018ba6e8229e316799d

See more details on using hashes here.

Provenance

The following attestation bundles were made for cdk_vpc_endpoint_with_private_ip-0.0.8-py3-none-any.whl:

Publisher: release.yml on badmintoncryer/cdk-vpc-endpoint-with-private-ip

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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