Python용 AWS SDK인 boto3를 사용하여 AWS를 빠르게 시작하십시오. Boto3를 사용하면 Python 애플리케이션, 라이브러리 또는 스크립트를 Amazon S3, Amazon EC2, Amazon DynamoDB 등 AWS 서비스와 쉽게 통합할 수 있습니다.
# 다운로드
pip install boto3
import boto3
# S3 클라이언트 생성 예제
s3_client = boto3.client('s3')
res = s3_client.list_buckets()
print(res["Contents"]) # json 형태 응답
# S3 리소스 생성 예제
s3_resource = boto3.resource('s3')
my_bucket = s3_resource.Bucket('my_bucket_name')
for obj in my_bucket.objects.all():
print(obj.key)
https://aws.amazon.com/ko/sdk-for-python/
https://boto3.amazonaws.com/v1/documentation/api/latest/index.html
https://tech.cloud.nongshim.co.kr/2021/03/12/boto3%EA%B0%80-aws%EC%9D%98-%EC%9E%90%EA%B2%A9%EC%A6%9D%EB%AA%85credentials%EC%9D%84-%ED%99%95%EC%9D%B8%ED%95%98%EB%8A%94-%EC%88%9C%EC%84%9C-from-python/