Package Exports
- @alma-cdk/aws-interface-endpoints
- @alma-cdk/aws-interface-endpoints/lib/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@alma-cdk/aws-interface-endpoints) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
npm i -D @alma-cdk/aws-interface-endpointsL3 construct helping with PrivateLink-powered VPC Interface Endpoints for AWS Services.
🚧 Project Stability
This construct is still versioned with v0 major version and breaking changes might be introduced if necessary (without a major version bump), though we aim to keep the API as stable as possible (even within v0 development). We aim to publish v1.0.0 soon and after that breaking changes will be introduced via major version bumps.
Getting Started
Endpoint open to whole isolated subnet
import { AwsInterfaceEndpoints } from '@alma-cdk/aws-interface-endpoints';
import * as ec2 from 'aws-cdk-lib/aws-ec2';const vpc = new ec2.Vpc();
new AwsInterfaceEndpoints(this, 'EcrInterfaceEndpoint', {
vpc,
services: [
ec2.InterfaceVpcEndpointAwsService.ECR_DOCKER,
],
});Session Manager connection endpoints
import { AwsInterfaceEndpoints } from '@alma-cdk/aws-interface-endpoints';
import * as ec2 from 'aws-cdk-lib/aws-ec2';const vpc = new ec2.Vpc();
new AwsInterfaceEndpoints(this, 'SessionManagerInterfaceEndpoint', {
vpc,
services: AwsInterfaceEndpoints.SessionManagerConnect,
});Explictly opened endpoints
- In your VPC creation stack
import { AwsInterfaceEndpoints } from '@alma-cdk/aws-interface-endpoints';
import * as ec2 from 'aws-cdk-lib/aws-ec2';const vpc = new ec2.Vpc();
new AwsInterfaceEndpoints(this, 'EcrInterfaceEndpoint', {
vpc,
open: false,
services: [
ec2.InterfaceVpcEndpointAwsService.ECR_DOCKER,
],
});- In some other stack (maybe on a completely different CDK application):
import { AwsInterfaceEndpoints } from '@alma-cdk/aws-interface-endpoints';
import * as ec2 from 'aws-cdk-lib/aws-ec2';define instance: ec2.Instance;
const endpoints = AwsInterfaceEndpoints.fromAttributes(this, 'EcrInterfaceEndpoint', {
services: [
ec2.InterfaceVpcEndpointAwsService.ECR_DOCKER,
],
});
endpoints.allowDefaultPromFrom(instance);https://docs.aws.amazon.com/systems-manager/latest/userguide/setup-create-vpc.html
https://aws.amazon.com/privatelink/pricing/
https://docs.aws.amazon.com/vpc/latest/privatelink/create-interface-endpoint.html