EC2 instance created then teminated

I created at instance using the EC2 option. The instance is created but I get the error:

Error waiting for SSH: Too many retries waiting for SSH to be available. Last error: Maximum number of retries (60) exceeded.

Then when I go back to the EC2 console, the instance is terminated. Here is what my cloud trail logs show. The relevant entries are the ones with the rancher username.

I noticed that during the provisioning there is no place to set the keypair name for SSH access. How can SSH work between the instance and the server if that is not configured?

I tried again and noticed that the Key Pair Name that is listed is the same as I used to name the instance: The key I use for SSH is call InstanceMGMT. The name of the instance in this case was Graylog-SV02.

Below is a copy of the API: i have removed the credentials.

{
“id”: “1ph7”,
“type”: “machine”,
“links”: {
“self”: “…/v1/projects/1a5/machines/1ph7”,
“account”: “…/v1/projects/1a5/machines/1ph7/account”,
“hosts”: “…/v1/projects/1a5/machines/1ph7/hosts”,
},
“actions”: {
“bootstrap”: “…/v1/projects/1a5/machines/1ph7/?action=bootstrap”,
“remove”: “…/v1/projects/1a5/machines/1ph7/?action=remove”,
“error”: “…/v1/projects/1a5/machines/1ph7/?action=error”,
},
“name”: “Graylog-SV02”,
“state”: “creating”,
“accountId”: “1a5”,
“amazonec2Config”: {
“region”: “us-west-1”,
“instanceType”: “t2.small”,
“securityGroup”: “rancher-machine”,
“zone”: “c”,
“rootSize”: “40”,
“accessKey”: “XXXXXXXXXXXX”,
“secretKey”: “XXXXXXXXXX”,
“vpcId”: “vpc-6fe62f0a”,
“subnetId”: “subnet-b163dfe8”,
“ami”: “ami-3e394d5e”,
“sshUser”: “ubuntu”,
“iamInstanceProfile”: “Docker”,
“sessionToken”: null,
“spotPrice”: null,
},
“authCertificateAuthority”: null,
“authKey”: null,
“azureConfig”: null,
“created”: “2016-01-20T01:39:33Z”,
“createdTS”: 1453253973000,
“description”: “graylog”,
“digitaloceanConfig”: null,
“dockerVersion”: null,
“driver”: “amazonec2”,
“engineEnv”: null,
“engineInsecureRegistry”: null,
“engineInstallUrl”: null,
“engineLabel”: null,
“engineOpt”: { },
“engineRegistryMirror”: null,
“engineStorageDriver”: null,
“exoscaleConfig”: null,
“externalId”: “fc517ac2-9930-4ce8-8e45-39f692d4f05f”,
“kind”: “machine”,
“labels”: {
“Cluster”: “graylogSV”,
},
“openstackConfig”: null,
“packetConfig”: null,
“rackspaceConfig”: null,
“removed”: null,
“softlayerConfig”: null,
“transitioning”: “yes”,
“transitioningMessage”: “Machine is running, waiting for SSH to be available…”,
“transitioningProgress”: null,
“ubiquityConfig”: null,
“uuid”: “b07074ff-1784-4793-b8f4-769a11fb2c92”,
“virtualboxConfig”: null,
“vmwarevcloudairConfig”: null,
“vmwarevsphereConfig”: null,
}

Closing in favor of this Github issue:

https://github.com/rancher/rancher/issues/3345