Create a proxy
A proxy is an ELB for Envoy resource that runs your Envoy configuration on ELB for Envoy nodes that AWS manages. When you create a proxy, ELB for Envoy provisions a dedicated DNS endpoint in the VPC that you specify and runs the configuration that you provide.
This topic covers all options for creating a proxy. For a guided first-time walkthrough, see Get started: create your first proxy. To learn how proxies run your configuration, see How proxies work.
Prerequisites
Before you create a proxy, make sure that you have the following:
-
A VPC with at least two subnets in different Availability Zones. Each subnet must have at least 8 available IPv4 addresses for the proxy to scale.
-
One or more security groups in that VPC that allow the client traffic you expect.
-
A proxy role. This is an AWS Identity and Access Management (IAM) role that you pass as
roleArn. Its trust policy must allow theelasticloadbalancing.amazonaws.com.rproxy.goskope.comservice principal to callsts:AssumeRole, and it must grant the proxy permission to publish logs. For the full role setup, see Set up ELB for Envoy. -
An Envoy configuration file (the bootstrap YAML). For how to author it, see Envoy configuration for ELB for Envoy.
The following options require extra resources:
-
To protect the proxy with AWS WAF, create a web ACL first. See Protect a proxy with AWS WAF.
-
To encrypt the proxy's configuration with your own key, create a customer managed AWS KMS key first. See Encrypt a proxy configuration with a customer managed key.
-
To terminate TLS with an AWS Certificate Manager (ACM) certificate, request or import the certificate first. See Terminate TLS with an ACM certificate.
Proxy role permissions
The proxy role trust policy must allow ELB for Envoy to assume the role:
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": "elasticloadbalancing.amazonaws.com" }, "Action": "sts:AssumeRole" } ] }
At a minimum, grant the role permission to publish Envoy process logs to Amazon CloudWatch Logs:
{ "Effect": "Allow", "Action": [ "logs:CreateLogGroup", "logs:CreateLogStream", "logs:PutLogEvents" ], "Resource": [ "arn:*:logs:*:*:log-group:/aws/elb-proxy/*", "arn:*:logs:*:*:log-group:/aws/elb-proxy/*:log-stream:*" ] }
Add any further permissions that your Envoy configuration needs when its filters and extensions call AWS services.
CreateProxy inputs
The following table describes the inputs to the CreateProxy operation. The
console and AWS CLI set the same inputs.
| Input | Type | Required | Description |
|---|---|---|---|
name |
String | Yes | The name of the proxy. The name must be unique within your account for the Region.
Valid characters are a-z, A-Z, 0-9, and hyphens
(-), with 1–32 characters. You can't use a hyphen as the first or last
character. |
type |
String | Yes | The type of proxy. The only value is envoy. |
proxyVersion |
String | Yes | The version of the proxy software, in major.minor format (for example,
1.40). |
roleArn |
String | Yes | The ARN of the proxy role (an IAM role). The role provides permissions to the code that your Envoy configuration runs on the proxy, such as filters and extensions, when that code calls AWS services. |
configuration |
Object | Yes | The configuration for the proxy. Contains configurationFile and an
optional configurationArchive. |
configuration.configurationFile |
Blob (YAML) | Yes | The Envoy configuration file (bootstrap YAML). |
configuration.configurationArchive |
Blob (ZIP) | No | A ZIP archive of files that the configuration file references. Omit it if your configuration references no external files. |
networkConfiguration.ipConfiguration.ipAddressingConfiguration.ipv4Addressability |
String | Yes | The IPv4 addressing for the proxy: off, internet-facing,
or internal. |
networkConfiguration.ipConfiguration.ipAddressingConfiguration.ipv6Addressability |
String | Yes | The IPv6 addressing for the proxy: off, internet-facing,
or internal. |
networkConfiguration.vpcConfiguration.subnets |
List | Yes | The subnets for the proxy. Each entry is a subnetId. At least one is
required. |
networkConfiguration.vpcConfiguration.securityGroups |
List | Yes | The security groups for the proxy. Each entry is a securityGroupId. At
least one is required. |
attributes |
List | No | Key-value proxy attributes that control secondary behavior. Attributes that you don't set take their default values, and you can change them after creation. See Proxy attributes. |
customerKmsKeyArn |
String | No | The ARN of a customer managed AWS KMS key used to encrypt the proxy's configuration content. If you don't set it, ELB for Envoy uses the default AWS owned key. See Encrypt a proxy configuration with a customer managed key. |
tags |
Map | No | The tags for the proxy, as key-value pairs. A tag key has 1–128 characters; a tag value has 0–256 characters. See Tag a proxy. |
clientToken |
String | No | A unique, case-sensitive identifier that you provide to make the create request idempotent. |
You can't set off for both ipv4Addressability and
ipv6Addressability, and you can't mix internal with
internet-facing across the two. At least one address type must be on, and both
must use the same scheme. For IP addressing details, see How proxies work.
The configuration file and archive have maximum size limits. For the current limits, see Envoy configuration limits and unsupported features.
Create a proxy
Create a proxy using the console, the AWS CLI, or CloudFormation. Choose the tab for the method that you want to use.
Verify that the proxy is active
Confirm that the proxy finished provisioning before you send traffic to it.
To check proxy status (AWS CLI)
-
Run the get-proxy command.
aws elb-proxy get-proxy --proxy-identifier <proxy-arn>Replace
proxy-arnwith the ARN of your proxy. A proxy ARN has the formarn:aws:elasticloadbalancing:<region>:<account-id>:proxy/.... -
Repeat the command until
statusreportsactive. The proxy response also includes thednsNamethat clients use to reach the proxy.
In the console, the proxy appears on the Proxies page, where its status
changes from create-in-progress to active.
Clean up
To delete a proxy that you no longer need, see Delete a proxy.