ec2-instance-connect:SendSSHPublicKey

Write

ec2-instance-connect:SendSSHPublicKey is a Write access-level action in the ec2-instance-connect service. Grants permission to push an SSH public key to the specified EC2 instance to be used for standard SSH

Resource types

ARNs that ec2-instance-connect:SendSSHPublicKey can be scoped to in an IAM policy.

arn:${Partition}:ec2:${Region}:${Account}:instance/${InstanceId}
instance

Condition keys

Keys you can use in the Condition block of a policy that grants ec2-instance-connect:SendSSHPublicKey.

aws:ResourceTag/${TagKey} String

Filters access by tags associated with the resource

ec2:ResourceTag/${TagKey} String

Filters access by tags associated with the resource

Example IAM policy

A minimal policy that allows ec2-instance-connect:SendSSHPublicKey. Replace "Resource": "*" with a specific ARN to follow least privilege.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "AllowEc2instanceconnectSendSSHPublicKey",
      "Effect": "Allow",
      "Action": "ec2-instance-connect:SendSSHPublicKey",
      "Resource": "*"
    }
  ]
}

Related actions in ec2-instance-connect

View all ec2-instance-connect actions →