AWS EC2 Instance Connect

2019/06/27 - AWS EC2 Instance Connect - 1 new api methods

Changes  Update ec2-instance-connect client to latest version

SendSSHPublicKey (new) Link ΒΆ

Pushes an SSH public key to a particular OS user on a given EC2 instance for 60 seconds.

See also: AWS API Documentation

Request Syntax

client.send_ssh_public_key(
    InstanceId='string',
    InstanceOSUser='string',
    SSHPublicKey='string',
    AvailabilityZone='string'
)
type InstanceId:

string

param InstanceId:

[REQUIRED]

The EC2 instance you wish to publish the SSH key to.

type InstanceOSUser:

string

param InstanceOSUser:

[REQUIRED]

The OS user on the EC2 instance whom the key may be used to authenticate as.

type SSHPublicKey:

string

param SSHPublicKey:

[REQUIRED]

The public key to be published to the instance. To use it after publication you must have the matching private key.

type AvailabilityZone:

string

param AvailabilityZone:

[REQUIRED]

The availability zone the EC2 instance was launched in.

rtype:

dict

returns:

Response Syntax

{
    'RequestId': 'string',
    'Success': True|False
}

Response Structure

  • (dict) --

    • RequestId (string) --

      The request ID as logged by EC2 Connect. Please provide this when contacting AWS Support.

    • Success (boolean) --

      Indicates request success.