-
boto3 패키지를 사용한 s3 권한 확인 업로드 테스트 (using boto3 for s3 upload test)aws 2020. 11. 6. 18:57728x90
boto3 패키지 설치 (Requirements)
pip3 install boto3
테스트용 파일 생성
touch test.txt
uploadtos3.py
import boto3 s3 = boto3.resource('s3') s3.Bucket('your-bucket-name').upload_file('test.txt','your/directory/path/test.txt')
uploadtos3.py 파일썬 파일 실행 후 s3 버킷의 디렉토리 경로에서 파일 생성 결과 확인
python3 uploadtos3.py
s3 의 경우 동일한 bucket 안에 디렉토리별 세부 권한을 할당할 수 있어서
권한 편집 후 이러한 테스트를 통해 권한이 정상적으로 부여되어있는지 확인 할 수 있습니다.
'aws' 카테고리의 다른 글
aws cloudwatch memory monitoring 추가 (0) 2020.11.11 동일한 vpc 내에 public subnet 과 private subnet ssm agent 적용 방법 (0) 2020.11.10 ssm agent 설치 (centos) (0) 2020.11.09 mount to s3 with s3fs on redhat(centos) (0) 2020.11.04 Jupyterhub 구축 가이드 (0) 2020.11.02