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

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

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

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

[실습] Jenkins에 AWS 자격증명 추가하기 / AWS CLI 환경 변수 구성

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
adding-aws-credentials-to-jenkins
type
post
updatedAt

✅ 1. Jenkins에 AWS 자격 증명 추가하기

notion image
notion image
notion image
notion image
notion image
notion image
  • Username : IAM에서 발급받은 액세스 키
  • Password : IAM에서 발급받은 비밀 액세스 키
  • ID : my-aws로 설정
 
 

✅ 2. AWS CLI 환경 변수 구성

Configuring environment variables for the AWS CLI - AWS Command Line Interface
The AWS CLI is an open source tool built using the AWS SDK for Python (Boto) that provides commands for interacting with AWS services. With minimal configuration, you can start using all of the functionality provided by the AWS Management Console from your favorite terminal program. This guide provides instructions for installing, configuring, and using the AWS CLI on Windows, macOS, and Linux. Learn how to use the AWS CLI to access the public API of any AWS service and write scripts to manage your AWS resources.
Configuring environment variables for the AWS CLI - AWS Command Line Interface
https://docs.aws.amazon.com/cli/v1/userguide/cli-configure-envvars.html
Configuring environment variables for the AWS CLI - AWS Command Line Interface
  • 방금 등록한 자격 증명을 우리의 Jenkinsfile에 등록하기 위해 다음 문서를 참고한다.
notion image
  • 해당 이미지를 참고하여 Jenkins 파일에 환경 변수를 구성해 보자
notion image
  • Pipeline 문법을 손쉽게 생성해주는 Pipeline Syntax에 접속한다.
  • 이미지를 참고하여 다음과 같이 설정한다.
notion image
  • 반드시 해당 이미지와 동일하게 입력해야 한다.
  • Credentials의 경우 아까 등록했던 자격 증명이 맞는지 반드시 확인한다.
  • Generate Pipeline Script 버튼을 클릭하여 해당 구문을 생성하고 복사한다.
stage('AWS') { agent { docker { image 'amazon/aws-cli' args "--entrypoint=''" } } steps { withCredentials([usernamePassword(credentialsId: 'my-aws', passwordVariable: 'AWS_SECRET_ACCESS_KEY', usernameVariable: 'AWS_ACCESS_KEY_ID')]) { sh ''' aws --version aws s3 ls ''' } } }
notion image
  • 해당 버킷 목록이 잘 출력된다면 성공
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) 강의의 수업 자료 중 일부입니다.