Actions, resources, and condition keys for Amazon EC2 Instance Connect
Amazon EC2 Instance Connect (service prefix: ec2-instance-connect) provides the following
service-specific operations, resources, actions, and condition keys for use in IAM permission
policies.
References:
-
Learn how to configure this service.
-
View a list of the API operations available for this service.
-
Learn how to secure this service and its resources by using IAM permission policies.
-
View the programmatic service authorization reference
for this service.
Topics
API operations defined by Amazon EC2 Instance Connect
The following table maps API operations to the IAM actions they authorize. Only condition keys that have static values for the given API and action are listed; for the full set of condition keys supported by each action, see the Actions table.
| Operation | IAM action | Condition key | Possible value(s) | Access level |
|---|---|---|---|---|
|
SendSSHPublicKey |
Write |
|||
|
SendSerialConsoleSSHPublicKey |
Write |
Actions defined by Amazon EC2 Instance Connect
You can specify the following actions in the Action element of an IAM
policy statement. Use policies to grant permissions to perform an operation in Amazon. When
you use an action in a policy, you usually allow or deny access to the API operation or CLI
command with the same name. However, in some cases, a single action controls access to more
than one operation. Alternatively, some operations require several different actions.
| Actions | Description | Resource types (*required) | Condition keys | Access level |
|---|---|---|---|---|
Grants permission to establish SSH connection to an EC2 instance using EC2 Instance Connect Endpoint |
Write |
|||
|
ec2-instance-connect:MaxTunnelDuration ec2-instance-connect:privateIpAddress |
||||
Grants permission to push an SSH public key to the specified EC2 instance to be used for standard SSH |
Write |
|||
Grants permission to push an SSH public key to the specified EC2 instance to be used for serial console SSH |
Write |
Resource types defined by Amazon EC2 Instance Connect
The following resource types are defined by this service and can be used in the
Resource element of IAM permission policy statements.
| Resource types | ARN | Condition keys |
|---|---|---|
arn:${Partition}:ec2:${Region}:${Account}:instance/${InstanceId} |
||
arn:${Partition}:ec2:${Region}:${Account}:instance-connect-endpoint/${InstanceConnectEndpointId} |
Condition keys for Amazon EC2 Instance Connect
Amazon EC2 Instance Connect defines the following condition keys that can be used in the
Condition element of an IAM policy.
| Condition keys | Description | Type |
|---|---|---|
Filters access by tags associated with the resource |
String |
|
Filters access by maximum session duration associated with the instance |
Numeric |
|
Filters access by private IP Address associated with the instance |
IPAddress |
|
Filters access by port number associated with the instance |
Numeric |
|
Filters access by tags associated with the resource |
String |
|
Filters access by specifying the default user name for the AMI that you used to launch your instance |
String |