Skip to content

Instantly share code, notes, and snippets.

@aibou
Created December 6, 2016 06:15
Show Gist options
  • Save aibou/459bb756374ba916256bcf7f74a44b5a to your computer and use it in GitHub Desktop.
Save aibou/459bb756374ba916256bcf7f74a44b5a to your computer and use it in GitHub Desktop.
opsworksのalias
[toplevel]
tokyo-stacks = opsworks describe-stacks --region ap-northeast-1
tokyo-layers =
!f() {
for stack_id in $(aws opsworks describe-stacks --region ap-northeast-1 --query "Stacks[].StackId" --output text)
do
aws opsworks describe-layers --region ap-northeast-1 --stack-id ${stack_id}
done
}; f
us-stacks = opsworks describe-stacks --region us-east-1
us-layers =
!f() {
for stack_id in $(aws opsworks describe-stacks --region us-east-1 --query "Stacks[].StackId" --output text)
do
aws opsworks describe-layers --region us-east-1 --stack-id ${stack_id}
done
}; f
(aws tokyo-stacks ; aws us-stacks) > stacks
(aws tokyo-layers ; aws us-layers) > layers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment