Python boto3를 이용하여 특정 object의 클래스를 변경해 보자.
# STANDARD → STANDARD_IA 클래스 변경
import boto3
s3 = boto3.client('s3')
bucket_name=' '
object_key = ' '
res = s3.copy_object(
CopySource=f"{bucket_name}/{object_key}",
Bucket=bucket_name,
Key=object_key,
StorageClass='STANDARD_IA')
print(res)
아래와 같이 스토리지 클래스가 변경되었다.
'AWS Infra' 카테고리의 다른 글
[ AWS ] Python boto3를 이용하여 WAF IPset IP 수정하기 (0) | 2023.05.16 |
---|---|
[ AWS ] Python boto3를 이용하여 RDS Connections 데이터 추출 하기 (0) | 2023.05.11 |
[ AWS ] Python boto3를 이용하여 ELB Metric 모니터링 (0) | 2023.05.10 |
[ AWS ] Python boto3를 이용하여 Target Group Health 모니터링 (0) | 2023.04.25 |
[ AWS ] Python boto3를 이용하여 s3 log 압축파일(gz) DataFrame 만들기 - CloudFront Logs (0) | 2023.03.16 |
[ Python ] Python을 이용한 ElastiCache Redis Hash Data Export & Import (0) | 2023.02.28 |
[ AWS ] Python boto3를 이용하여 값 CPUCreditBalance 구하기 (0) | 2023.02.02 |
[ AWS ] Python boto3를 이용하여 EC2 CPU 사용율 구하기 (0) | 2023.02.02 |