AWS EC2 configuration

HI,

I’m trying to add an EC2 instance as a news Rancher hostm, but got this message when doing so:

Error setting machine configuration from flags provided: amazonec2 driver requires the --amazonec2-access-key option or proper credentials in ~/.aws/credentials

Did I forgot something here ?

ps: new to AWS/Rancher

Thanks

How are you trying to add the EC2 host into Rancher?

Are you using the UI? Or have you already spun up something in EC2?

Hi,

I have nothing running in EC2 at the moment, just entering my credencials to have rancher to launch it.

David

Have you been able to start Rancher server container?

Where is rancher server running ? outside ec2 environemnt accessible on public network or only via a vpc vpn ?

Hi,

Server is outside ec2 and access AWS using public network.

Cheers

David

Tried aws security group with ANY traffic in and out your vpc for test purpose ?
Are you running the right rancher os ami or spinning up a custom host ?

Maybe first try to spin up a custom ec host. Advantage is, to have full access of docker and container logfile to look for agent/client side errors?

Any further erros in debug log of rancher server ?

The IAM user associated with your credentials (AWS access key and secret access key) need to have the ability to create EC2 instance permissions.