Permalink
Browse files

Updated validate_instance to take into account validating an instance…

… running on HP Helion Eucalyptus
  • Loading branch information...
hspencer77 committed Apr 13, 2015
1 parent 3f5b82a commit e11d47b80218f8fa0da2b9100a415cf827a17535
Showing with 3 additions and 2 deletions.
  1. +3 −2 awscli/customizations/codedeploy/utils.py
@@ -109,8 +109,9 @@ def validate_instance(params):
'supported.'
)
try:
- urlopen('http://169.254.169.254/latest/meta-data/', timeout=1)
- raise RuntimeError('Amazon EC2 instances are not supported.')
+ image_id = urlopen('http://169.254.169.254/latest/meta-data/ami-id', timeout=1)
+ if re.search("^ami", image_id.read()):
+ raise RuntimeError('Amazon EC2 instances are not supported.')
except (URLError, timeout):
pass

0 comments on commit e11d47b

Please sign in to comment.