Skip to content

Commit

Permalink
modify option
Browse files Browse the repository at this point in the history
  • Loading branch information
yuta-imai committed Oct 7, 2012
1 parent f424d59 commit bcad51f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python/staticip_to_spotinstance_in_vpc/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@
parser = optparse.OptionParser()
parser.add_option('-e', '--eni_id', dest='eni_id')
parser.add_option('-r', '--iam_role', dest='iam_role')
parser.add_option('-t', '--target_iam_role', dest='target_iam_role')
options, reminder = parser.parse_args()

# create ec2connection instance
response = urllib2.urlopen('http://169.254.169.254/latest/meta-data/iam/security-credentials/' + options.iam_role)
response =
urllib2.urlopen('http://169.254.169.254/latest/meta-data/iam/security-credentials/'
+ options.target_iam_role)
credential = json.loads(response.read())
ec2connection = boto.ec2.connect_to_region(
'ap-northeast-1',
Expand Down

0 comments on commit bcad51f

Please sign in to comment.