Knife ec2 create invalid AMI error when us-west-2, but not us-east-1


#1

hiya,

when i try to use knife ec2 to create a node in ec2 us-west-2, i get an
error saying i “have not provided a valid image (AMI) value.” but, i in
fact did supply a valid ID with the correct syntax. however, i run the
same kind of command for us-east-1, and it works.

for us-west-2:

[zahadum ~]$ knife ec2 server create -N host01.gruentea.com -E prod_foo -S prod-foo-keypair -Z us-west-2b -f m1.large -I ami-50046666 -g sg-xyz --user-data /path/chef-repo/nodes/node-host01.gruentea.com.json --distro ubuntu-launch

ERROR: You have not provided a valid image (AMI) value. Please note the short option for this value recently changed from ‘-i’ to ‘-I’.

for us-east-1:

[zahadum ~]$ knife ec2 server create -N host02.gruentea.com -E dev_foo -S dev-foo-keypair -Z us-east-1c -f m1.large -I ami-13027777 -g sg-d7a87777 --user-data /path/chef-repo/nodes/node-host02.gruentea.com.json --distro ubuntu-launch
Instance ID: i-41049e30
Flavor: m1.large
Image: ami-13027777
Region: us-east-1
Availability Zone: us-east-1c
[snip]

i recall a while ago there use to be an issue where fog lacked any
knowledge of us-west-2, but that has since been fixed afaik:

[zahadum fog-1.8.0]$ grep us-west-2 changelog.txt
us-west-2 default ami. thanks Edward Muller
add us-west-2 region. thanks geemus

can anyone help me figure out what’s going on? how to debug this further?

thanks so much in advance,
kallen

my deets:

$ which ruby
/home/kallen/.rvm/rubies/ruby-1.9.2-p290/bin/ruby

$ gem list | egrep 'chef|knife|fog’
chef (10.16.2)
fog (1.8.0, 1.6.0)
knife-ec2 (0.6.2)

$ grep AWS ~/.chef/knife.rb
knife[:aws_access_key_id] = "#{ENV[‘AWS_ACCESS_KEY_ID’]}"
knife[:aws_secret_access_key] = “#{ENV[‘AWS_SECRET_ACCESS_KEY’]}”

$ env | egrep 'AWS_(SECRET|ACCESS)'
AWS_SECRET_ACCESS_KEY=kjkSUPER
AWS_ACCESS_KEY_ID=AKIthanksforasking


#2

I see there are two versions of fog installed. Probably the knife-ec2
plugin uses the old plugin. One thing to try is to remove the 1.6.0 fog
library and try again.

Alternately you would need to use this patch:
http://lists.opscode.com/sympa/arc/chef/2012-02/msg00129.html

Regards*,*
Chirag Jog
Chief Technology Officer,
Clogeny Technologies | http://clogeny.com
(M) 0091-9766619440 | Skype: chirag.jog

On Fri, Jan 11, 2013 at 5:46 AM, kallen@groknaut.net wrote:

hiya,

when i try to use knife ec2 to create a node in ec2 us-west-2, i get an
error saying i “have not provided a valid image (AMI) value.” but, i in
fact did supply a valid ID with the correct syntax. however, i run the
same kind of command for us-east-1, and it works.

for us-west-2:

[zahadum ~]$ knife ec2 server create -N host01.gruentea.com -E prod_foo
-S prod-foo-keypair -Z us-west-2b -f m1.large -I ami-50046666 -g sg-xyz
–user-data /path/chef-repo/nodes/node-host01.gruentea.com.json --distro
ubuntu-launch

ERROR: You have not provided a valid image (AMI) value. Please note the
short option for this value recently changed from ‘-i’ to ‘-I’.

for us-east-1:

[zahadum ~]$ knife ec2 server create -N host02.gruentea.com -E dev_foo -S
dev-foo-keypair -Z us-east-1c -f m1.large -I ami-13027777 -g sg-d7a87777
–user-data /path/chef-repo/nodes/node-host02.gruentea.com.json --distro
ubuntu-launch
Instance ID: i-41049e30
Flavor: m1.large
Image: ami-13027777
Region: us-east-1
Availability Zone: us-east-1c
[snip]

i recall a while ago there use to be an issue where fog lacked any
knowledge of us-west-2, but that has since been fixed afaik:

[zahadum fog-1.8.0]$ grep us-west-2 changelog.txt
us-west-2 default ami. thanks Edward Muller
add us-west-2 region. thanks geemus

can anyone help me figure out what’s going on? how to debug this further?

thanks so much in advance,
kallen

my deets:

$ which ruby
/home/kallen/.rvm/rubies/ruby-1.9.2-p290/bin/ruby

$ gem list | egrep 'chef|knife|fog’
chef (10.16.2)
fog (1.8.0, 1.6.0)
knife-ec2 (0.6.2)

$ grep AWS ~/.chef/knife.rb
knife[:aws_access_key_id] = "#{ENV[‘AWS_ACCESS_KEY_ID’]}"
knife[:aws_secret_access_key] = “#{ENV[‘AWS_SECRET_ACCESS_KEY’]}”

$ env | egrep 'AWS_(SECRET|ACCESS)'
AWS_SECRET_ACCESS_KEY=kjkSUPER
AWS_ACCESS_KEY_ID=AKIthanksforasking


#3

AMIs only exist in one datacenter. If you’re using somebody else’s you’ll
need to find a different AMI id for each datacenter. If you’ve made your
own you’ll need to figure out how to move them. I think AWS has tools for
it but can’t recall for sure.

On Thu, Jan 10, 2013 at 11:17 PM, Chirag Jog chirag@clogeny.com wrote:

I see there are two versions of fog installed. Probably the knife-ec2
plugin uses the old plugin. One thing to try is to remove the 1.6.0 fog
library and try again.

Alternately you would need to use this patch:
http://lists.opscode.com/sympa/arc/chef/2012-02/msg00129.html

Regards*,*
Chirag Jog
Chief Technology Officer,
Clogeny Technologies | http://clogeny.com
(M) 0091-9766619440 | Skype: chirag.jog

On Fri, Jan 11, 2013 at 5:46 AM, kallen@groknaut.net wrote:

hiya,

when i try to use knife ec2 to create a node in ec2 us-west-2, i get an
error saying i “have not provided a valid image (AMI) value.” but, i in
fact did supply a valid ID with the correct syntax. however, i run the
same kind of command for us-east-1, and it works.

for us-west-2:

[zahadum ~]$ knife ec2 server create -N host01.gruentea.com -E prod_foo
-S prod-foo-keypair -Z us-west-2b -f m1.large -I ami-50046666 -g sg-xyz
–user-data /path/chef-repo/nodes/node-host01.gruentea.com.json --distro
ubuntu-launch

ERROR: You have not provided a valid image (AMI) value. Please note the
short option for this value recently changed from ‘-i’ to ‘-I’.

for us-east-1:

[zahadum ~]$ knife ec2 server create -N host02.gruentea.com -E dev_foo
-S dev-foo-keypair -Z us-east-1c -f m1.large -I ami-13027777 -g sg-d7a87777
–user-data /path/chef-repo/nodes/node-host02.gruentea.com.json --distro
ubuntu-launch
Instance ID: i-41049e30
Flavor: m1.large
Image: ami-13027777
Region: us-east-1
Availability Zone: us-east-1c
[snip]

i recall a while ago there use to be an issue where fog lacked any
knowledge of us-west-2, but that has since been fixed afaik:

[zahadum fog-1.8.0]$ grep us-west-2 changelog.txt
us-west-2 default ami. thanks Edward Muller
add us-west-2 region. thanks geemus

can anyone help me figure out what’s going on? how to debug this further?

thanks so much in advance,
kallen

my deets:

$ which ruby
/home/kallen/.rvm/rubies/ruby-1.9.2-p290/bin/ruby

$ gem list | egrep 'chef|knife|fog’
chef (10.16.2)
fog (1.8.0, 1.6.0)
knife-ec2 (0.6.2)

$ grep AWS ~/.chef/knife.rb
knife[:aws_access_key_id] = "#{ENV[‘AWS_ACCESS_KEY_ID’]}"
knife[:aws_secret_access_key] = “#{ENV[‘AWS_SECRET_ACCESS_KEY’]}”

$ env | egrep 'AWS_(SECRET|ACCESS)'
AWS_SECRET_ACCESS_KEY=kjkSUPER
AWS_ACCESS_KEY_ID=AKIthanksforasking


#4

thanks for the responses so far. but i still need help:

the us-west-2 issue is fixed in both fog 1.6.0 and 1.8.0:

[zahadum fog-1.8.0] cd ../fog-1.6.0/ [zahadum fog-1.6.0] grep us-west-2 changelog.txt
us-west-2 default ami. thanks Edward Muller
add us-west-2 region. thanks geemus

each specific AMI ID i try in east and west is an AMI i built specifically
in that region. so there’s no need to move any AMIs. “knife ec2 server
create” works for me when launching in east, but not west.

any other ideas?

On Fri, 11 Jan 2013, Leo Dirac (SR) wrote:

AMIs only exist in one datacenter. If you’re using somebody else’s you’ll
need to find a different AMI id for each datacenter. If you’ve made your
own you’ll need to figure out how to move them. I think AWS has tools for
it but can’t recall for sure.

On Thu, Jan 10, 2013 at 11:17 PM, Chirag Jog chirag@clogeny.com wrote:

I see there are two versions of fog installed. Probably the knife-ec2
plugin uses the old plugin. One thing to try is to remove the 1.6.0 fog
library and try again.

Alternately you would need to use this patch:
http://lists.opscode.com/sympa/arc/chef/2012-02/msg00129.html

Regards*,*
Chirag Jog
Chief Technology Officer,
Clogeny Technologies | http://clogeny.com
(M) 0091-9766619440 | Skype: chirag.jog

On Fri, Jan 11, 2013 at 5:46 AM, kallen@groknaut.net wrote:

hiya,

when i try to use knife ec2 to create a node in ec2 us-west-2, i get an
error saying i “have not provided a valid image (AMI) value.” but, i in
fact did supply a valid ID with the correct syntax. however, i run the
same kind of command for us-east-1, and it works.

for us-west-2:

[zahadum ~]$ knife ec2 server create -N host01.gruentea.com -E prod_foo
-S prod-foo-keypair -Z us-west-2b -f m1.large -I ami-50046666 -g sg-xyz
–user-data /path/chef-repo/nodes/node-host01.gruentea.com.json --distro
ubuntu-launch

ERROR: You have not provided a valid image (AMI) value. Please note the
short option for this value recently changed from ‘-i’ to ‘-I’.

for us-east-1:

[zahadum ~]$ knife ec2 server create -N host02.gruentea.com -E dev_foo
-S dev-foo-keypair -Z us-east-1c -f m1.large -I ami-13027777 -g sg-d7a87777
–user-data /path/chef-repo/nodes/node-host02.gruentea.com.json --distro
ubuntu-launch
Instance ID: i-41049e30
Flavor: m1.large
Image: ami-13027777
Region: us-east-1
Availability Zone: us-east-1c
[snip]

i recall a while ago there use to be an issue where fog lacked any
knowledge of us-west-2, but that has since been fixed afaik:

[zahadum fog-1.8.0]$ grep us-west-2 changelog.txt
us-west-2 default ami. thanks Edward Muller
add us-west-2 region. thanks geemus

can anyone help me figure out what’s going on? how to debug this further?

thanks so much in advance,
kallen

my deets:

$ which ruby
/home/kallen/.rvm/rubies/ruby-1.9.2-p290/bin/ruby

$ gem list | egrep 'chef|knife|fog’
chef (10.16.2)
fog (1.8.0, 1.6.0)
knife-ec2 (0.6.2)

$ grep AWS ~/.chef/knife.rb
knife[:aws_access_key_id] = "#{ENV[‘AWS_ACCESS_KEY_ID’]}"
knife[:aws_secret_access_key] = “#{ENV[‘AWS_SECRET_ACCESS_KEY’]}”

$ env | egrep 'AWS_(SECRET|ACCESS)'
AWS_SECRET_ACCESS_KEY=kjkSUPER
AWS_ACCESS_KEY_ID=AKIthanksforasking


#5

and yes, these AMIs do launch successfully when i use AWS’s ec2-run-instances.

On Fri, 11 Jan 2013, kallen@groknaut.net wrote:

thanks for the responses so far. but i still need help:

the us-west-2 issue is fixed in both fog 1.6.0 and 1.8.0:

[zahadum fog-1.8.0] cd ../fog-1.6.0/ [zahadum fog-1.6.0] grep us-west-2 changelog.txt
us-west-2 default ami. thanks Edward Muller
add us-west-2 region. thanks geemus

each specific AMI ID i try in east and west is an AMI i built specifically
in that region. so there’s no need to move any AMIs. “knife ec2 server
create” works for me when launching in east, but not west.

any other ideas?

On Fri, 11 Jan 2013, Leo Dirac (SR) wrote:

AMIs only exist in one datacenter. If you’re using somebody else’s you’ll
need to find a different AMI id for each datacenter. If you’ve made your
own you’ll need to figure out how to move them. I think AWS has tools for
it but can’t recall for sure.

On Thu, Jan 10, 2013 at 11:17 PM, Chirag Jog chirag@clogeny.com wrote:

I see there are two versions of fog installed. Probably the knife-ec2
plugin uses the old plugin. One thing to try is to remove the 1.6.0 fog
library and try again.

Alternately you would need to use this patch:
http://lists.opscode.com/sympa/arc/chef/2012-02/msg00129.html

Regards*,*
Chirag Jog
Chief Technology Officer,
Clogeny Technologies | http://clogeny.com
(M) 0091-9766619440 | Skype: chirag.jog

On Fri, Jan 11, 2013 at 5:46 AM, kallen@groknaut.net wrote:

hiya,

when i try to use knife ec2 to create a node in ec2 us-west-2, i get an
error saying i “have not provided a valid image (AMI) value.” but, i in
fact did supply a valid ID with the correct syntax. however, i run the
same kind of command for us-east-1, and it works.

for us-west-2:

[zahadum ~]$ knife ec2 server create -N host01.gruentea.com -E prod_foo
-S prod-foo-keypair -Z us-west-2b -f m1.large -I ami-50046666 -g sg-xyz
–user-data /path/chef-repo/nodes/node-host01.gruentea.com.json --distro
ubuntu-launch

ERROR: You have not provided a valid image (AMI) value. Please note the
short option for this value recently changed from ‘-i’ to ‘-I’.

for us-east-1:

[zahadum ~]$ knife ec2 server create -N host02.gruentea.com -E dev_foo
-S dev-foo-keypair -Z us-east-1c -f m1.large -I ami-13027777 -g sg-d7a87777
–user-data /path/chef-repo/nodes/node-host02.gruentea.com.json --distro
ubuntu-launch
Instance ID: i-41049e30
Flavor: m1.large
Image: ami-13027777
Region: us-east-1
Availability Zone: us-east-1c
[snip]

i recall a while ago there use to be an issue where fog lacked any
knowledge of us-west-2, but that has since been fixed afaik:

[zahadum fog-1.8.0]$ grep us-west-2 changelog.txt
us-west-2 default ami. thanks Edward Muller
add us-west-2 region. thanks geemus

can anyone help me figure out what’s going on? how to debug this further?

thanks so much in advance,
kallen

my deets:

$ which ruby
/home/kallen/.rvm/rubies/ruby-1.9.2-p290/bin/ruby

$ gem list | egrep 'chef|knife|fog’
chef (10.16.2)
fog (1.8.0, 1.6.0)
knife-ec2 (0.6.2)

$ grep AWS ~/.chef/knife.rb
knife[:aws_access_key_id] = "#{ENV[‘AWS_ACCESS_KEY_ID’]}"
knife[:aws_secret_access_key] = “#{ENV[‘AWS_SECRET_ACCESS_KEY’]}”

$ env | egrep 'AWS_(SECRET|ACCESS)'
AWS_SECRET_ACCESS_KEY=kjkSUPER
AWS_ACCESS_KEY_ID=AKIthanksforasking


#6

has anyone else on the list successfully created a node with knife ec2
in us-west-2? i’m wondering if it’s just me, if i need to crack open
the the code to figure out how to further debug this.

running the below-mentioned knife ec2 command with -VV only gives me:

DEBUG: Using configuration from /home/kallen/.chef/knife.rb
ERROR: You have not provided a valid image (AMI) value. Please note the short
option for this value recently changed from ‘-i’ to ‘-I’.

kallen

On Fri, 11 Jan 2013, kallen@groknaut.net wrote:

and yes, these AMIs do launch successfully when i use AWS’s ec2-run-instances.

On Fri, 11 Jan 2013, kallen@groknaut.net wrote:

thanks for the responses so far. but i still need help:

the us-west-2 issue is fixed in both fog 1.6.0 and 1.8.0:

[zahadum fog-1.8.0] cd ../fog-1.6.0/ [zahadum fog-1.6.0] grep us-west-2 changelog.txt
us-west-2 default ami. thanks Edward Muller
add us-west-2 region. thanks geemus

each specific AMI ID i try in east and west is an AMI i built specifically
in that region. so there’s no need to move any AMIs. “knife ec2 server
create” works for me when launching in east, but not west.

any other ideas?

On Fri, 11 Jan 2013, Leo Dirac (SR) wrote:

AMIs only exist in one datacenter. If you’re using somebody else’s you’ll
need to find a different AMI id for each datacenter. If you’ve made your
own you’ll need to figure out how to move them. I think AWS has tools for
it but can’t recall for sure.

On Thu, Jan 10, 2013 at 11:17 PM, Chirag Jog chirag@clogeny.com wrote:

I see there are two versions of fog installed. Probably the knife-ec2
plugin uses the old plugin. One thing to try is to remove the 1.6.0 fog
library and try again.

Alternately you would need to use this patch:
http://lists.opscode.com/sympa/arc/chef/2012-02/msg00129.html

Regards*,*
Chirag Jog
Chief Technology Officer,
Clogeny Technologies | http://clogeny.com
(M) 0091-9766619440 | Skype: chirag.jog

On Fri, Jan 11, 2013 at 5:46 AM, kallen@groknaut.net wrote:

hiya,

when i try to use knife ec2 to create a node in ec2 us-west-2, i get an
error saying i “have not provided a valid image (AMI) value.” but, i in
fact did supply a valid ID with the correct syntax. however, i run the
same kind of command for us-east-1, and it works.

for us-west-2:

[zahadum ~]$ knife ec2 server create -N host01.gruentea.com -E prod_foo
-S prod-foo-keypair -Z us-west-2b -f m1.large -I ami-50046666 -g sg-xyz
–user-data /path/chef-repo/nodes/node-host01.gruentea.com.json --distro
ubuntu-launch

ERROR: You have not provided a valid image (AMI) value. Please note the
short option for this value recently changed from ‘-i’ to ‘-I’.

for us-east-1:

[zahadum ~]$ knife ec2 server create -N host02.gruentea.com -E dev_foo
-S dev-foo-keypair -Z us-east-1c -f m1.large -I ami-13027777 -g sg-d7a87777
–user-data /path/chef-repo/nodes/node-host02.gruentea.com.json --distro
ubuntu-launch
Instance ID: i-41049e30
Flavor: m1.large
Image: ami-13027777
Region: us-east-1
Availability Zone: us-east-1c
[snip]

i recall a while ago there use to be an issue where fog lacked any
knowledge of us-west-2, but that has since been fixed afaik:

[zahadum fog-1.8.0]$ grep us-west-2 changelog.txt
us-west-2 default ami. thanks Edward Muller
add us-west-2 region. thanks geemus

can anyone help me figure out what’s going on? how to debug this further?

thanks so much in advance,
kallen

my deets:

$ which ruby
/home/kallen/.rvm/rubies/ruby-1.9.2-p290/bin/ruby

$ gem list | egrep 'chef|knife|fog’
chef (10.16.2)
fog (1.8.0, 1.6.0)
knife-ec2 (0.6.2)

$ grep AWS ~/.chef/knife.rb
knife[:aws_access_key_id] = "#{ENV[‘AWS_ACCESS_KEY_ID’]}"
knife[:aws_secret_access_key] = “#{ENV[‘AWS_SECRET_ACCESS_KEY’]}”

$ env | egrep 'AWS_(SECRET|ACCESS)'
AWS_SECRET_ACCESS_KEY=kjkSUPER
AWS_ACCESS_KEY_ID=AKIthanksforasking


#7

Just created one now for a test:

knife ec2 server create -r “role[setup]” -I ami-ca2ca4fa -f m1.small
-S keys-naw -G varnish -x ubuntu --region us-west-2 -Z us-west-2b
–node-name test --distro ubuntu10.04-ruby187 -i ~/.keys/keys-naw.pem

Got the AMI from here:

http://cloud-images.ubuntu.com/locator/ec2/

On Wed, Jan 16, 2013 at 12:41 PM, kallen@groknaut.net wrote:

has anyone else on the list successfully created a node with knife ec2
in us-west-2? i’m wondering if it’s just me, if i need to crack open
the the code to figure out how to further debug this.

running the below-mentioned knife ec2 command with -VV only gives me:

DEBUG: Using configuration from /home/kallen/.chef/knife.rb
ERROR: You have not provided a valid image (AMI) value. Please note the short
option for this value recently changed from ‘-i’ to ‘-I’.

kallen

On Fri, 11 Jan 2013, kallen@groknaut.net wrote:

and yes, these AMIs do launch successfully when i use AWS’s ec2-run-instances.

On Fri, 11 Jan 2013, kallen@groknaut.net wrote:

thanks for the responses so far. but i still need help:

the us-west-2 issue is fixed in both fog 1.6.0 and 1.8.0:

[zahadum fog-1.8.0] cd ../fog-1.6.0/ [zahadum fog-1.6.0] grep us-west-2 changelog.txt
us-west-2 default ami. thanks Edward Muller
add us-west-2 region. thanks geemus

each specific AMI ID i try in east and west is an AMI i built specifically
in that region. so there’s no need to move any AMIs. “knife ec2 server
create” works for me when launching in east, but not west.

any other ideas?

On Fri, 11 Jan 2013, Leo Dirac (SR) wrote:

AMIs only exist in one datacenter. If you’re using somebody else’s you’ll
need to find a different AMI id for each datacenter. If you’ve made your
own you’ll need to figure out how to move them. I think AWS has tools for
it but can’t recall for sure.

On Thu, Jan 10, 2013 at 11:17 PM, Chirag Jog chirag@clogeny.com wrote:

I see there are two versions of fog installed. Probably the knife-ec2
plugin uses the old plugin. One thing to try is to remove the 1.6.0 fog
library and try again.

Alternately you would need to use this patch:
http://lists.opscode.com/sympa/arc/chef/2012-02/msg00129.html

Regards*,*
Chirag Jog
Chief Technology Officer,
Clogeny Technologies | http://clogeny.com
(M) 0091-9766619440 | Skype: chirag.jog

On Fri, Jan 11, 2013 at 5:46 AM, kallen@groknaut.net wrote:

hiya,

when i try to use knife ec2 to create a node in ec2 us-west-2, i get an
error saying i “have not provided a valid image (AMI) value.” but, i in
fact did supply a valid ID with the correct syntax. however, i run the
same kind of command for us-east-1, and it works.

for us-west-2:

[zahadum ~]$ knife ec2 server create -N host01.gruentea.com -E prod_foo
-S prod-foo-keypair -Z us-west-2b -f m1.large -I ami-50046666 -g sg-xyz
–user-data /path/chef-repo/nodes/node-host01.gruentea.com.json --distro
ubuntu-launch

ERROR: You have not provided a valid image (AMI) value. Please note the
short option for this value recently changed from ‘-i’ to ‘-I’.

for us-east-1:

[zahadum ~]$ knife ec2 server create -N host02.gruentea.com -E dev_foo
-S dev-foo-keypair -Z us-east-1c -f m1.large -I ami-13027777 -g sg-d7a87777
–user-data /path/chef-repo/nodes/node-host02.gruentea.com.json --distro
ubuntu-launch
Instance ID: i-41049e30
Flavor: m1.large
Image: ami-13027777
Region: us-east-1
Availability Zone: us-east-1c
[snip]

i recall a while ago there use to be an issue where fog lacked any
knowledge of us-west-2, but that has since been fixed afaik:

[zahadum fog-1.8.0]$ grep us-west-2 changelog.txt
us-west-2 default ami. thanks Edward Muller
add us-west-2 region. thanks geemus

can anyone help me figure out what’s going on? how to debug this further?

thanks so much in advance,
kallen

my deets:

$ which ruby
/home/kallen/.rvm/rubies/ruby-1.9.2-p290/bin/ruby

$ gem list | egrep 'chef|knife|fog’
chef (10.16.2)
fog (1.8.0, 1.6.0)
knife-ec2 (0.6.2)

$ grep AWS ~/.chef/knife.rb
knife[:aws_access_key_id] = "#{ENV[‘AWS_ACCESS_KEY_ID’]}"
knife[:aws_secret_access_key] = “#{ENV[‘AWS_SECRET_ACCESS_KEY’]}”

$ env | egrep 'AWS_(SECRET|ACCESS)'
AWS_SECRET_ACCESS_KEY=kjkSUPER
AWS_ACCESS_KEY_ID=AKIthanksforasking


#8

hmm. that AMI, 12.04 LTS 64bit instance-store, also fails for me in
us-west-2. but in us-east-1, ami-d726abbe, 12.04 LTS, works.

i don’t understand …

west:

[zahadum ~]$ knife ec2 server create -N host01.gruentea.com -E prod_foo -S prod-foo-keypair -Z us-west-2b -f m1.large -I ami-ca2ca4fa -g sg-xyz --user-data /path/chef-repo/nodes/node-host01.gruentea.com.json --distro okta-ubuntu-launch -VV
DEBUG: Using configuration from /home/kallen/.chef/knife.rb
ERROR: You have not provided a valid image (AMI) value. Please note
the short option for this value recently changed from ‘-i’ to ‘-I’.

east:

[zahadum ~]$ knife ec2 server create -N host02.gruentea.com -E dev_foo -S dev-foo-keypair -Z us-east-1c -f m1.large -I ami-d726abbe -g sg-d7a87777 --user-data /path/chef-repo/nodes/node-host02.gruentea.com.json --distro okta-ubuntu-launch -VV
DEBUG: Using configuration from /home/kallen/.chef/knife.rb
Instance ID: i-c5f9a3b4
Flavor: m1.large
Image: ami-d726abbe
Region: us-east-1
Availability Zone: us-east-1b
Security Group Ids: sg-05a8xxxxx
Tags: {“Name”=>“host02.gruentea.com”}
SSH Key: dev-foo-keypair

Waiting for server…
[snip]

On Wed, 16 Jan 2013, Darron Froese wrote:

Just created one now for a test:

knife ec2 server create -r “role[setup]” -I ami-ca2ca4fa -f m1.small
-S keys-naw -G varnish -x ubuntu --region us-west-2 -Z us-west-2b
–node-name test --distro ubuntu10.04-ruby187 -i ~/.keys/keys-naw.pem

Got the AMI from here:

http://cloud-images.ubuntu.com/locator/ec2/

On Wed, Jan 16, 2013 at 12:41 PM, kallen@groknaut.net wrote:

has anyone else on the list successfully created a node with knife ec2
in us-west-2? i’m wondering if it’s just me, if i need to crack open
the the code to figure out how to further debug this.

running the below-mentioned knife ec2 command with -VV only gives me:

DEBUG: Using configuration from /home/kallen/.chef/knife.rb
ERROR: You have not provided a valid image (AMI) value. Please note the short
option for this value recently changed from ‘-i’ to ‘-I’.

kallen

On Fri, 11 Jan 2013, kallen@groknaut.net wrote:

and yes, these AMIs do launch successfully when i use AWS’s ec2-run-instances.


#9

You’re not using --region in your ec2 server create calls. It isn’t
automatically inferred from the availability zone.

Cheers,

AJ

On 17 January 2013 09:42, kallen@groknaut.net wrote:

hmm. that AMI, 12.04 LTS 64bit instance-store, also fails for me in
us-west-2. but in us-east-1, ami-d726abbe, 12.04 LTS, works.

i don’t understand …

west:

[zahadum ~]$ knife ec2 server create -N host01.gruentea.com -E prod_foo
-S prod-foo-keypair -Z us-west-2b -f m1.large -I ami-ca2ca4fa -g sg-xyz
–user-data /path/chef-repo/nodes/node-host01.gruentea.com.json --distro
okta-ubuntu-launch -VV
DEBUG: Using configuration from /home/kallen/.chef/knife.rb
ERROR: You have not provided a valid image (AMI) value. Please note
the short option for this value recently changed from ‘-i’ to ‘-I’.

east:

[zahadum ~]$ knife ec2 server create -N host02.gruentea.com -E dev_foo -S
dev-foo-keypair -Z us-east-1c -f m1.large -I ami-d726abbe -g sg-d7a87777
–user-data /path/chef-repo/nodes/node-host02.gruentea.com.json --distro
okta-ubuntu-launch -VV
DEBUG: Using configuration from /home/kallen/.chef/knife.rb
Instance ID: i-c5f9a3b4
Flavor: m1.large
Image: ami-d726abbe
Region: us-east-1
Availability Zone: us-east-1b
Security Group Ids: sg-05a8xxxxx
Tags: {“Name”=>“host02.gruentea.com”}
SSH Key: dev-foo-keypair

Waiting for server…
[snip]

On Wed, 16 Jan 2013, Darron Froese wrote:

Just created one now for a test:

knife ec2 server create -r “role[setup]” -I ami-ca2ca4fa -f m1.small
-S keys-naw -G varnish -x ubuntu --region us-west-2 -Z us-west-2b
–node-name test --distro ubuntu10.04-ruby187 -i ~/.keys/keys-naw.pem

Got the AMI from here:

http://cloud-images.ubuntu.com/locator/ec2/

On Wed, Jan 16, 2013 at 12:41 PM, kallen@groknaut.net wrote:

has anyone else on the list successfully created a node with knife ec2
in us-west-2? i’m wondering if it’s just me, if i need to crack open
the the code to figure out how to further debug this.

running the below-mentioned knife ec2 command with -VV only gives me:

DEBUG: Using configuration from /home/kallen/.chef/knife.rb
ERROR: You have not provided a valid image (AMI) value. Please note
the short

option for this value recently changed from ‘-i’ to ‘-I’.

kallen

On Fri, 11 Jan 2013, kallen@groknaut.net wrote:

and yes, these AMIs do launch successfully when i use AWS’s
ec2-run-instances.


#10

that’s it! thanks AJ for spotting that.

On Thu, 17 Jan 2013, AJ Christensen wrote:

You’re not using --region in your ec2 server create calls. It isn’t
automatically inferred from the availability zone.

Cheers,

AJ