JSCODE Logo
블로그후기멘토진
회사명 : JSCODE대표 : 박재성사업자 등록번호 : 244-22-01557통신판매업 : 제 2023-인천미추홀-0381 호
학원 명칭 : 제이에스코드(JSCODE)원격학원학원설립ㆍ운영 등록번호 : 제6063호

서울특별시 구로구 경인로 20가길 11(오류동, 아델리아)

Copyright ⓒ 2025 JSCODE - 최상위 현업 개발자들의 프로그래밍 교육 All rights reserved.

이용약관개인정보처리방침
← 블로그 목록으로 돌아가기

[실습] AWS CLI로 S3 버킷 목록 가져오기

JSCODE 시니
JSCODE 시니
2026. 04. 09.
author
JSCODE 시니
category
Jenkins CI/CD
createdAt
Apr 9, 2026 12:57 PM
isPublic
isPublic
series
Jenkins를 활용한 CI/CD 입문 (with.AWS)
slug
listing-s3-buckets-using-aws-cli
type
post
updatedAt

✅ 1. AWS CLI로 S3 버킷 목록 가져오기

s3 — AWS CLI 2.34.20 Command Reference
Use the AWS CLI 2.34.20 to run the s3 command.
s3 — AWS CLI 2.34.20 Command Reference
https://docs.aws.amazon.com/cli/latest/reference/s3/
  • AWS CLI에 익숙하지 않더라도 해당 문서를 확인하면 명령어의 구조를 파악할 수 있다.
notion image
ls — AWS CLI 2.34.14 Command Reference
Use the AWS CLI 2.34.14 to run the s3 ls command.
ls — AWS CLI 2.34.14 Command Reference
https://docs.aws.amazon.com/cli/latest/reference/s3/ls.html
  • ls 명령어는 일반적으로 리눅스에서도 list의 줄임말로 현재 위치나 특정 경로의 디렉터리 내용의 목록을 출력하는 명령어이다.
  • 해당 명령어를 이용하면 S3 버킷의 목록을 가져올 수 있다.
stage('AWS') { agent { docker { image 'amazon/aws-cli' args "--entrypoint=''" } } steps { sh ''' aws --version aws s3 ls ''' } }
notion image
  • 실제 빌드를 수행해보면 버킷 목록을 가져올 수 없는 것을 알 수 있다. 이유가 무엇일까?
  • 이유는 단순하다. 우리는 Jenkins에게 우리의 aws 계정 정보를 넘겨준 적이 없기 때문이다.
  • 따라서 Jenkins 내부에 우리의 AWS 자격 증명을 등록해 주어야 한다.
 
author
category
Jenkins CI/CD
createdAt
Apr 9, 2026 01:25 PM
isPublic
isPublic
series
Jenkins를 활용한 CI/CD 입문 (with.AWS)
slug
type
series-footer
updatedAt
📎
이 글은 Jenkins를 활용한 CI/CD 입문 (with.AWS) 강의의 수업 자료 중 일부입니다.