if (FALSE) {
svc <- ec2instanceconnect()
# The following example pushes a sample SSH public key to the EC2 instance
# i-abcd1234 in AZ us-west-2b for use by the instance OS user ec2-user.
svc$send_ssh_public_key(
AvailabilityZone = "us-west-2a",
InstanceId = "i-abcd1234",
InstanceOSUser = "ec2-user",
SSHPublicKey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC3FlHqj2eqCdrGHuA6d..."
)
}
Run the code above in your browser using DataLab