Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import boto3
- # Sostituisci con le tue credenziali
- access_key = "xxxxxx"
- secret_key = "xxxxxx"
- # Imposta l'endpoint personalizzato
- endpoint_url = "https://gateway.storjshare.io:443"
- # Crea un client S3 con l'endpoint personalizzato
- s3 = boto3.client('s3', endpoint_url=endpoint_url, aws_access_key_id=access_key, aws_secret_access_key=secret_key)
- # Esempio: elenco dei bucket S3
- try:
- response = s3.list_buckets()
- print("I tuoi bucket S3:")
- for bucket in response['Buckets']:
- print(f" - {bucket['Name']}")
- except Exception as e:
- print(f"Errore durante l'elenco dei bucket S3: {str(e)}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement