Skip to content

Commit

Permalink
adds a note to describe the role of region in bucket creation
Browse files Browse the repository at this point in the history
  • Loading branch information
ubaskota committed Nov 12, 2024
1 parent 5b3637b commit 12e24d8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/source/guide/s3-example-creating-buckets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ The name of an Amazon S3 bucket must be unique across all regions of the AWS
platform. The bucket can be located in a specific region to minimize latency
or to address regulatory requirements.

.. note::
The `LocationConstraint` value is used to specify the region where a bucket
will be created. S3 requires `LocationConstraint` to be specified when creating
buckets using a client in regions other than `us-east-1`. When no region is
specified, `us-east-1` is used by default. The example below ensures the S3
client is created in the same region as the bucket to avoid a
`IllegalLocationConstraintException` error.

.. code-block:: python
import logging
Expand Down

0 comments on commit 12e24d8

Please sign in to comment.