Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update the documentation for creating s3 bucket to address the region mismatch issue. #4337

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 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,22 @@ 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.

.. warning::

You need to make sure that the region in your aws configuration matches the
region where you want your bucket to be created. By default, s3 will create
a bucket in ``us-east-1`` if the ``LocationConstraint`` is not specified.
However, if the region in your configuration doesn't match the
``LocationConstraint``, you'll get ``IllegalLocationConstraintException``
error when calling ``create_bucket`` function.

To avoid this error, you should either:

* Option 1: Make sure that your ``LocationConstraint`` is same as the region in your
configuration, or
* Option 2: If you're using a default value for ``LocationConstraint``, make sure
that the region in your configuration is set to ``us-east-1``.

.. code-block:: python
ubaskota marked this conversation as resolved.
Show resolved Hide resolved

import logging
Expand Down Expand Up @@ -61,6 +77,8 @@ or to address regulatory requirements.
return True




ubaskota marked this conversation as resolved.
Show resolved Hide resolved
List existing buckets
=====================

Expand Down