This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| aws ec2 describe-instances --region ap-northeast-1 --instance-ids ${instance_ids} --filters '[{"Name":"instance-state-name", "Values":["running"]}]' | jq -r '.Reservations[].Instances[].PrivateIpAddress' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| aws elb describe-load-balancers --region ap-northeast-1 | jq -r '.LoadBalancerDescriptions[] | select(.LoadBalancerName == ロードバランサー名) | .Instances[].InstanceId' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import botocore | |
| import botocore.session | |
| s = botocore.session.get_session() | |
| ec2 = s.get_service('ec2') | |
| ep = ec2.get_endpoint() | |
| op = ec2.get_operation('DescribeInstances') | |
| # Nameタグの値がhogeあるいはfuga | |
| status, resp = op.call(ep, filters=[{"Name":"tag:Name", "Values":["hoge","fuga"]}]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Effect": "Allow", | |
| "Action": [ | |
| "s3:ListAllMyBuckets", "s3:GetBucketLocation" | |
| ], | |
| "Resource": ["arn:aws:s3:::*"] | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| aaa="" | |
| bbb="" | |
| function errorexit() | |
| { | |
| echo $1 | |
| exit | |
| } | |
| function usage() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Sid": "Stmt1393242299000", | |
| "Effect": "Allow", | |
| "Action": [ | |
| "iam:ChangePassword", | |
| "iam:GetAccountPasswordPolicy" | |
| ], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| aws ec2 describe-instances | ¥ | |
| jq -r '.Reservations[].Instances[] | select(.InstanceId == "インスタンスID") | .Tags[] | select (.Key == "タグ名") | .Value' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 確認方法 | |
| aws elb describe-load-balancer-attributes --load-balancer-name ELB名 | |
| 設定方法 (ONの場合: OFFの時は false) | |
| aws elb modify-load-balancer-attributes --load-balancer-name ELB名 --load-balancer-attributes '{ "CrossZoneLoadBalancing": {"Enabled": true }}' | |
| === | |
| 機能の説明 | |
| http://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/enable-disable-crosszone-lb.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## built-in TCP input | |
| ## $ echo <json> | fluent-cat <tag> | |
| <source> | |
| type forward | |
| port 24224 | |
| </source> | |
| # Listen DRb for debug | |
| <source> | |
| type debug_agent |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import ROOTPACKAGE.MAIN_MODULE | |
| ROOTPACKAGE.MAIN_MODULE.main() |