Skip to content

Instantly share code, notes, and snippets.

@qpSHiNqp
Created October 2, 2018 09:17
Show Gist options
  • Save qpSHiNqp/c2a63ac63a0544b604c8e0b33ed75a06 to your computer and use it in GitHub Desktop.
Save qpSHiNqp/c2a63ac63a0544b604c8e0b33ed75a06 to your computer and use it in GitHub Desktop.
Elastic Beanstalkのdocker環境のホスト上で自分の環境名を得る
#!/bin/sh
aws ec2 describe-tags --region ap-northeast-1 --filters "Name=resource-id,Values=`curl http://169.254.169.254/latest/meta-data/instance-id`" "Name=key,Values=elasticbeanstalk:environment-name" | jq -r .Tags[0].Value
# regionは適宜適宜してください。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment