aws cli
AWS CLI v2AWS Command Line Interface 빠른 참조 — 자격 증명 설정, IAM 신원, EC2 / Lambda / S3 / DynamoDB / IAM, 프로파일, SSO, 페이징 / 출력 형식 — 자주 쓰는 옵션과 실전 예시까지 함께 정리했습니다.
명령어 40개
도움말
aws --versionawscli 버전을 출력합니다(v2.x).
aws --versionaws help최상위 도움말 — 서비스 그룹과 기본 사용법을 나열합니다.
aws helpaws <service> help한 서비스의 명령을 표시합니다.
<service> help; aws <service> <command> help
aws s3 helpaws <service> <command> help단일 API 호출의 모든 플래그 + 매개변수를 표시합니다.
aws ec2 run-instances helpaws <service> <command> --generate-cli-skeleton명령의 모든 필수 / 선택 필드를 가진 JSON 스켈레톤을 출력합니다 — 입력으로 다시 붙여넣으세요.
--generate-cli-skeleton <input|output>; --cli-input-json <file>; --cli-input-yaml <file>
aws ec2 run-instances --generate-cli-skeleton > ec2.json설정
aws configure인터랙티브 마법사 — `~/.aws/credentials`와 `~/.aws/config`에 액세스 키, 시크릿, 출력 형식, region을 설정합니다.
aws configureaws configure --profile <name>`aws configure`와 같지만 명명된 프로파일에 기록합니다.
--profile dev; --profile prod; --no-prompt
aws configure --profile prodaws configure get <key>활성 설정에서 단일 값을 읽습니다.
default.region; default.output; <key>; --profile <name>
aws configure get region --profile prodaws configure set <key> <value>단일 설정 값을 설정합니다.
<key> <value>; --profile <name>
aws configure set region us-west-2aws configure list활성 설정을 표시합니다(프로파일, region, 액세스 키 ID, 시크릿은 마스킹).
aws configure listSSO / 신원
aws sso login --profile <name>SSO 디바이스 흐름 로그인(또는 브라우저 리다이렉트)을 시작합니다. 프로파일에 단기 자격 증명을 설정합니다.
--profile dev; --no-browser; --use-device-code
aws sso login --profile devaws sso configureSSO 프로파일을 인터랙티브하게 설정합니다(시작 URL, region, 계정, 역할).
aws sso configureaws sts get-caller-identity활성 자격 증명의 IAM 보안 주체(account / arn / user-id)를 출력합니다 — 설정 후 sanity check.
--profile <name>; --no-verify-ssl; --endpoint-url <url>
aws sts get-caller-identityaws sts assume-role --role-arn <arn> --role-session-name <name>IAM 역할로 전환해 임시 자격 증명을 받습니다 — 교차 계정 접근에 유용합니다.
--role-arn; --role-session-name; --external-id; --mfa-serial <arn>; --serial-number <arn>; --token-code <mfa>
aws sts assume-role --role-arn arn:aws:iam::123456789012:role/Admin --role-session-name admin출력
aws <service> <command> --output <format>출력 형식을 선택합니다: `json`(기본), `text`, `table`. jq 스타일 프로젝션에는 `--query`와 결합하세요.
json; text; table; yaml; yaml-stream
aws ec2 describe-instances --output tableaws <service> <command> --query '<JMES>'JMESPath 표현식(jq 스타일)으로 응답을 프로젝션합니다.
--query 'Reservations[].Instances[].InstanceId'; --query 'Reservations[].Instances[].[InstanceId,State.Name]'
aws ec2 describe-instances --query 'Reservations[].Instances[].[InstanceId,State.Name]' --output tableaws <service> <command> --no-paginate자동 페이징을 비활성화합니다 — 첫 페이지만 반환합니다(빠름; 개수만 필요할 때 유용).
aws s3 ls --no-paginateaws <service> <command> --cli-binary-format raw-in-base64-out입력 매개변수를 base64로 읽습니다 — `--zip-file fileb://lambda.zip` 같은 바이너리 매개변수에 필요합니다.
raw-in-base64-out; base64
aws lambda update-function-code --function-name fn --zip-file fileb://out.zip --cli-binary-format raw-in-base64-outEC2
aws ec2 describe-instances모든 EC2 인스턴스를 전체 세부사항과 함께 나열합니다.
--instance-ids i-xxx; --filters Name=tag:Name,Values=prod; --query; --output
aws ec2 describe-instances --query 'Reservations[].Instances[].{ID:InstanceId,State:State.Name}' --output tableaws ec2 start-instances --instance-ids <id>중지된 인스턴스 하나 이상을 시작합니다.
--instance-ids i-xxx i-yyy
aws ec2 start-instances --instance-ids i-0abc123aws ec2 stop-instances --instance-ids <id>실행 중인 인스턴스 하나 이상을 중지합니다(종료 없이).
aws ec2 stop-instances --instance-ids i-0abc123aws ec2 create-key-pair --key-name <name> --query 'KeyMaterial' --output text > key.pem새 SSH 키 쌍을 만들고 올바른 권한으로 개인 키를 `.pem` 파일에 저장합니다.
aws ec2 create-key-pair --key-name dev --query 'KeyMaterial' --output text > dev.pem && chmod 400 dev.pemS3
aws s3 ls(인자 없이) 버킷을 또는 프리픽�스의 파일을 나열합니다.
s3://<bucket>/<prefix>; --recursive; --human-readable; --summarize
aws s3 ls s3://my-bucket/data/aws s3 cp <local> s3://<bucket>/<key>파일을 업로드 또는 복사합니다. `s3://...`는 소스 또는 대상이 될 수 있습니다.
--recursive; --exclude '*'; --include '*.log'; --storage-class STANDARD|GLACIER|...; --acl public-read
aws s3 cp ./build/ s3://my-bucket/release/ --recursiveaws s3 sync <src> s3://<bucket>/<dst>S3 디렉터리 양방향 동기화(새로 / 변경된 파일을 업로드하고, `--delete`가 없으면 대상 측 추가 파일은 삭제하지 않음).
--delete; --exclude; --include; --no-progress; --exact-timestamps
aws s3 sync ./dist s3://my-bucket/app/ --deleteaws s3 mb s3://<bucket>새 S3 버킷을 만듭니다. Region 기본값은 us-east-1이며 재정의하려면 `--region`을 전달하세요.
--region eu-west-1
aws s3 mb s3://my-new-bucket --region eu-west-1aws s3 rb s3://<bucket>버킷을 제거합니다(먼저 객체를 비우려면 `--force` 사용).
--force; --no-progress
aws s3 rb s3://old-bucket --forceaws s3 presign s3://<bucket>/<key> --expires-in <seconds>`<seconds>` 후에 만료되는 사전 서명된 URL을 생성합니다 — 비공개 파일 공유에 유용합니다.
aws s3 presign s3://my-bucket/file.pdf --expires-in 3600Lambda
aws lambda list-functions현재 region의 모든 Lambda 함수를 나열합니다.
--function-version ALL; --max-items 50; --query 'Functions[].FunctionName'
aws lambda list-functions --query 'Functions[].FunctionName' --output textaws lambda update-function-code --function-name <name> --zip-file fileb://fn.zip로컬 zip에서 함수 코드를 업데이트합니다. 일부 설정에서는 `--cli-binary-format raw-in-base64-out`을 사용하세요.
aws lambda update-function-code --function-name my-fn --zip-file fileb://out.zip --cli-binary-format raw-in-base64-outaws lambda invoke --function-name <name> --payload '{}' out.json함수를 동기적으로 호출합니다 — 응답을 `out.json`에 씁니다.
--invocation-type Event|RequestResponse|DryRun; --log-type Tail; --cli-binary-format
aws lambda invoke --function-name my-fn --payload '{"key":"value"}' out.json && cat out.jsonDynamoDB
aws dynamodb scan --table-name <name>DynamoDB 테이블을 스캔합니다 — 모든 항목을 읽습니다(가능하면 키 조건으로 `query`를 사용하세요).
--table-name; --filter-expression; --projection-expression; --select; --max-items
aws dynamodb scan --table-name users --max-items 5aws dynamodb query --table-name <name> --key-condition-expression 'pk = :v' --expression-attribute-values '{":v":{"S":"u1"}}'키 조건 표현식으로 파티션 키별 항목을 쿼리합니다.
aws dynamodb query --table-name users --key-condition-expression '#u = :u' --expression-attribute-names '{"#u":"userId"}' --expression-attribute-values '{":u":{"S":"u1"}}'IAM
aws iam list-users계정의 모든 IAM 사용자를 나열합니다.
--path-prefix /; --max-items
aws iam list-users --query 'Users[].UserName' --output textaws iam create-user --user-name <name>새 IAM 사용자를 만듭니다.
aws iam create-user --user-name new-devaws iam attach-user-policy --user-name <name> --policy-arn <arn>관리형 정책을 사용자에게 연결합니다.
aws iam attach-user-policy --user-name new-dev --policy-arn arn:aws:iam::aws:policy/ReadOnlyAccess프로파일
aws --profile <name> <service> <cmd>명명된 프로파일(미리 설정되어 있어야 함) 하에서 모든 명령을 실행합니다.
--profile prod; --profile dev; --profile staging
aws --profile prod s3 lsAWS_PROFILE=<name> aws <service> <cmd>환경 변수로 프로파일을 설정합니다 — 스크립트에서 유용합니다.
AWS_PROFILE=prod aws lambda list-functions진단
aws --debug <service> <cmd>HTTP 와이어 레벨 로그를 stderr에 덤프합니다 — 서명 또는 페이로드 오류를 진단할 때 유용합니다.
--debug; --no-verify-ssl; --ca-bundle <file>; --cli-read-timeout <seconds>
aws --debug s3 ls 2> aws.logaws --no-sign-request <service> <cmd>서명되지 않은 요청을 만듭니다 — 공개 버킷 / 테스트 엔드포인트에 유용합니다.
aws --no-sign-request s3 cp public.txt s3://public-bucket/x관련 명령어 치트시트
azure cli
Azure CLI(az) 빠른 참조 — 인증, subscription / resource 관리, VM / AKS / Storage / App Service / Key Vault, 쿼리 형식, CI 친화적 워크플로우 — 자주 쓰는 옵션과 실전 예시까지 함께 정리했습니다.
명령어 43개
Azure CLI 2.60+
gcloud
gcloud(Google Cloud CLI), gsutil, bq 명령어 빠른 참조 — 인증, 프로젝트 / IAM, Compute / GKE / BigQuery / Cloud Storage, 설정, Cloud Build / Deploy — 자주 쓰는 옵션과 실전 예시까지 함께 정리했습니다.
명령어 48개
gcloud 480+
kubectl
Kubernetes CLI 클라이언트 kubectl 의 빠른 참조: context, get/describe, apply, logs/exec, rollout, 스케일링과 디버깅 — 자주 쓰는 옵션과 실전 예시까지 정리했습니다.
명령어 40개
kubectl 1.28+
docker
매일 쓰는 Docker CLI 명령어 빠른 참조: 컨테이너 생명주기, 이미지 빌드, 로그/exec, 네트워크, 볼륨, Compose, 레지스트리, 정리 작업 — 자주 쓰는 옵션과 실전 예시까지 함께 정리했습니다.
명령어 46개
Docker Engine 24.0+
상표 및 사용 안내
본 명령줄 도구 치트시트 모음은 오픈 커뮤니티 참고 자료입니다. 본 문서에서 언급되는 도구의 명칭, 로고, 상표(예: Git™, Docker™, Kubernetes®, kubectl, PostgreSQL®, MySQL®, Redis™, MongoDB®, Linux™, PowerShell™, Vim™ 등)는 각 권리자의 자산이며, 본 문서에서는 식별 및 참고 목적のみで 사용됩니다.
본 치트시트의 모든 내용은 독립적으로 작성된 단순화된 자체 완결형 참고 자료이며, 어떠한 공식 문서와도 계열·인정·출처 관계가 없습니다. 명령 목록, 플래그 설명, 예제는 모두 저자의 원본 단순화이며, 권위 있는 정보가 필요한 경우 각 도구의 공식 문서를 참조하시기 바랍니다.
명령 구문 및 옵션 플래그는 도구 버전에 따라 다를 수 있습니다. 표시되는 버전 태그는 안정 릴리스를 반영하며, 다른 버전에서는 동작이 다를 수 있습니다. 본 치트시트는 상표권자의 어떠한 선호나 권장도 의미하지 않습니다.
상표권자 또는 저작권자가 사이트의 일부 내용에 대해 권리 침해가 있다고 판단하시는 경우 [email protected]으로 이메일을 보내 주십시오. 유효한 권리 증명을 받은 후 합리적인 기간 내에 관련 내용을 수정하거나 삭제하겠습니다.
본 사이트는 사이트 정보의 이용으로 인해 발생하는 어떠한 직접적 또는 간접적 손해에 대해서도 법적 책임을 지지 않습니다.
AWS CLI 소개
AWS Command Line Interface(awscli)는 터미널에서 AWS 서비스를 제어하기 위한 Amazon의 공식 도구입니다. 현재 라인은 AWS CLI v2(2020년 출시; awscli 1.x는 유지보수 모드)입니다. v2는 단일 설치 프로그램(msi / pkg / 서명된 zip)으로 제공되며, SSO, 새로운 `aws sso login` 흐름, 자동 페이징, 바이너리 매개변수(Lambda zip 업로드 같은 base64 인코딩 blob 처리)를 지원합니다. 설정은 `~/.aws/config`(region, output format)와 `~/.aws/credentials`(액세스 키)로 분리되지만, IAM Identity Center / SSO를 사용할 때는 보통 장기 키 대신 `aws sso configure`를 사용합니다. 모든 AWS 서비스는 `aws <service> <command>`로 접근할 수 있습니다 — `aws ec2 describe-instances`, `aws s3 sync`, `aws lambda call`, `aws dynamodb scan`. CLI는 Apache-2.0 라이선스입니다. 더 새로운 대안으로는 인터랙티브 완성을 위한 `aws-shell`과 인프라스트럭처-as-code용 AWS CDK(`cdk`)가 있습니다. AWS CLI v2는 명시적으로 호출한 API 호출 외에는 소스 코드를 업로드하지 않습니다.
치트시트 버전 1.0.0