iam-veeramalla / iam-veeramalla/python-for-devops
Resolved the IllegalLocationConstrationException while creating Bucket in us-ease-1 region
- Vorherrschende Sprache
- Python
- Sterne
- 4.8k
- Forks
- 10.3k
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
### **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'}
)
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
No repository file or test is mentioned. Start with the boto3.client('s3') and create_bucket entry points shown in the issue, then check the project context for where this S3 region behavior should be documented or corrected; done means the intended handling of the LocationConstraint is clear.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- aws, python
- Bereich
- cloud
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100