Skip to content

Commit

Permalink
Now tags instances with $PWD information to track projects
Browse files Browse the repository at this point in the history
  • Loading branch information
mcianfrocco committed Apr 11, 2017
1 parent fdbdf9b commit e87601e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions aws/launch_AWS_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,10 @@ def launchInstance(params,keyName,keyPath,AMI,AWS_ACCOUNT_ID):
cmd='aws ec2 create-tags --resources %s --tags Key=Owner,Value=%s' %(InstanceID,keyName)
subprocess.Popen(cmd,shell=True).wait()

pwd=os.getcwd()
cmd='aws ec2 create-tags --resources %s --tags Key=Directory,Value=%s' %(InstanceID,pwd)
subprocess.Popen(cmd,shell=True).wait()

if params['cloudskip'] is False:
if params['debug'] is True:
print '\nAttaching cloud watch to instance...\n'
Expand Down

0 comments on commit e87601e

Please sign in to comment.