AWS Amazon EC2 Endpoint Service

This page shows how to write Terraform and CloudFormation for Amazon EC2 Endpoint Service and write them securely.

code-icon

Fix issues in your cloud & app configurations

Test for misconfigurations of this resource in your cloud.

get-started-button

Terraform Example (aws_vpc_endpoint_service)

Provides a VPC Endpoint Service resource. Service consumers can create an Interface VPC Endpoint to connect to the service.

NOTE on VPC Endpoint Services and VPC Endpoint Service Allowed Principals: Terraform provides both a standalone VPC Endpoint Service Allowed Principal resource and a VPC Endpoint Service resource with an allowed_principals attribute. Do not use the same principal ARN in both a VPC Endpoint Service resource and a VPC Endpoint Service Allowed Principal resource. Doing so will cause a conflict and will overwrite the association.

Parameters

Example Usage (from GitHub)

github-icondexterchan/Terraform_CrossRegionVPCPeering
resource "aws_vpc_endpoint_service" "mktsvc" {
  acceptance_required        = false
  network_load_balancer_arns = [aws_lb.fargate.arn]
  allowed_principals = var.vpc_endpointsvc_allowed_principals
}
github-icondexterchan/Terraform_CrossRegionVPCPeering
resource "aws_vpc_endpoint_service" "mktsvc" {
  acceptance_required        = false
  network_load_balancer_arns = [aws_lb.fargate.arn]
  allowed_principals = var.vpc_endpointsvc_allowed_principals
}

CloudFormation Example (AWS::EC2::VPCEndpointService)

Creates a VPC endpoint service configuration to which service consumers (AWS accounts, IAM users, and IAM roles) can connect.

To create an endpoint service configuration, you must first create one of the following for your service:+ A Network Load Balancer. Service consumers connect to your service using an interface endpoint.

  • A Gateway Load Balancer. Service consumers connect to your service using a Gateway Load Balancer endpoint.

For more information, see VPC Endpoint Services in the Amazon Virtual Private Cloud User Guide.

Parameters

Frequently asked questions

What is AWS Amazon EC2 Endpoint Service?

AWS Amazon EC2 Endpoint Service is a resource for Amazon EC2 of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.

Where can I find the example code for the AWS Amazon EC2 Endpoint Service?

For Terraform, the dexterchan/Terraform_CrossRegionVPCPeering and dexterchan/Terraform_CrossRegionVPCPeering source code examples are useful. See the Terraform Example section for further details.