S3
Creación de un bucket S3
Documentación
Qué es S3
S3 es un servicio de almacenamiento de objetos de Amazon Web Services. Los objetos son archivos y sus metadatos. Los objetos se organizan en buckets. Los buckets se organizan en regiones.
Creación de un bucket S3
Uso con Python
import boto3
# Retrieve the list of existing buckets
s3 = boto3.client('s3')
response = s3.list_buckets()
# Output the bucket names
print('Existing buckets:')
for bucket in response['Buckets']:
print(f' {bucket["Name"]}')
# upload file
# s3_client.upload_file(file_name, bucket, object_name)
s3.upload_file('test.txt', 'curso-py-iot', 'test.txt')
Última modificación September 7, 2023: proyeco (8f2e685)