My workstation and server are both RHEL ec2 instances and whenever I run the command:-
knife ec2 server create -r “role[----------]” -I ami-XXXXXXXX -f t2.small -S knife -i ~/.ssh/XXXXXXXXXXX.ppk –ssh-user ec2-user –region us-east-1 -Z us-east-1a
I am getting the error as ERROR: You did not provide a valid ‘AWS Access Key Id’ value. ERROR: You did not provide a valid ‘AWS Secret Access Key’ value.
Nor I want to use the secret access key and access key id and neither I want to save them on the workstation. Is there any other way to deploy a new ec2 instance(node) ,perhaps using IAM role . thank you
AFAIK we don't support role credentials in
knife-ec2
, you'll have to use something else to start the machine (like theaws
command line). Once created, you can useknife bootstrap
to set up Chef.