Created
April 21, 2022 01:34
-
-
Save digitalm/6155556a71b95eb2af40dbabe1ccd62d to your computer and use it in GitHub Desktop.
よく使うAWSコマンド
This file contains 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
# profile 定義ファイル | |
`cat ~/.aws/credentials` | |
# profile 指定 | |
`aws s3 ls --profile PROFILE_NAME` | |
# リージョン 指定 | |
`AWS_DEFAULT_REGION=ap-northeast-1 aws s3 ls` | |
# Service 情報表示 | |
`aws ecs describe-services --cluster CLUSTER_NAME --services SERVICE_NAME` | |
# TaskArn 取得 | |
`aws ecs list-tasks --cluster CLUSTER_NAME --service-name SERVICE_NAME` | |
# ecs ExecuteCommand | |
``` | |
aws ecs execute-command \ | |
--cluster CLUSTER_NAME \ | |
--task TASK_ARN \ | |
--container CONTAINER_NAME \ | |
--interactive \ | |
--command "sh" | |
``` | |
# check-ecs-exec, https://github.com/aws-containers/amazon-ecs-exec-checker | |
`./check-ecs-exec.sh CLUSTER_NAME TASK_ARN` | |
# S3 file recursive download | |
aws s3 cp s3://path/to/dir/ ~/Desktop/dest/dir/ --recursive |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment