-1

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

Fotis Grigorakis
  • 363
  • 1
  • 3
  • 16
Ritwik Singh
  • 75
  • 1
  • 8

1 Answers1

0

AFAIK we don't support role credentials in knife-ec2, you'll have to use something else to start the machine (like the aws command line). Once created, you can use knife bootstrap to set up Chef.

coderanger
  • 52,400
  • 4
  • 52
  • 75
  • is there any other way to create an ec2 instance with knife-ec2 plugin, recipe or knife.rb. i am a novice in chef and currently working on infra creation through chef. – Ritwik Singh Jul 28 '17 at 06:27