AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::EC2::InstanceConnectEndpoint

CfnInstanceConnectEndpoint

Creates an EC2 Instance Connect Endpoint. An EC2 Instance Connect Endpoint allows you to connect to an instance, without requiring the instance to have a public IPv4 address. For more information, see [Connect to your instances using EC2 Instance Connect Endpoint](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Connect-using-EC2-Instance-Connect-Endpoint.html) in the *Amazon EC2 User Guide* . With the replacement update behavior, CloudFormation usually creates the new resource first, changes references to point to the new resource, and then deletes the old resource. However, you can create only one EC2 Instance Connect Endpoint per VPC, so the replacement process fails. If you need to modify an EC2 Instance Connect Endpoint, you must replace the resource manually.

Import

import { CfnInstanceConnectEndpoint } from 'aws-cdk-lib/aws-ec2';

Or use the module namespace:

import * as ec2 from 'aws-cdk-lib/aws-ec2';
// ec2.CfnInstanceConnectEndpoint

Properties

Configuration passed to the constructor as CfnInstanceConnectEndpointProps.

subnetIdRequired
string

The ID of the subnet in which to create the EC2 Instance Connect Endpoint.

clientTokenOptional
string

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

preserveClientIpOptional
boolean | IResolvable

Indicates whether the client IP address is preserved as the source. The following are the possible values. - `true` - Use the client IP address as the source. - `false` - Use the network interface IP address as the source. > `PreserveClientIp` is only supported on IPv4 EC2 Instance Connect Endpoints. To use `PreserveClientIp` , the value for `IpAddressType` must be `ipv4` . Default: `false`

securityGroupIdsOptional
string[]

One or more security groups to associate with the endpoint. If you don't specify a security group, the default security group for your VPC will be associated with the endpoint.

tagsOptional
CfnTag[]

The tags to apply to the EC2 Instance Connect Endpoint during creation.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Get the Amazon EC2 Cheat Sheet

Everything you need to know about Amazon EC2 on one page. HD quality, print-friendly.

Download Free Infographic