iam-veeramalla / iam-veeramalla/python-for-devops
Resolved the IllegalLocationConstrationException while creating Bucket in us-ease-1 region
- Langage dominant
- Python
- Étoiles
- 4.8k
- Forks
- 10.3k
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
### **Creating S3 bucket using Boto3**
I was creating an S3 bucket but, Exception **IllegalLocationConstrationException.** By default S3 bucket was created in US-east-1 region.
To solve this Exception, I provided the location to the bucket ap-south-1 and s3 bucket created successfully.
Here is the code:
import boto3
client = boto3.client('s3')
response = client.create_bucket(
Bucket='',
CreateBucketConfiguration={'LocationConstraint': 'ap-south-1'}
)
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Aucun fichier du dépôt ni aucun test n’est mentionné. Commencez par les points d’entrée boto3.client('s3') et create_bucket présentés dans l’issue, puis examinez le contexte du projet pour déterminer où ce comportement de région S3 devrait être documenté ou corrigé ; le travail est considéré comme terminé lorsque la gestion prévue de LocationConstraint est claire.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- aws, python
- Domaine
- cloud
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 25/100