<p>I am trying to create an S3 bucket using </p>

<p><code>aws s3api create-bucket —bucket kubernetes-aws-wthamira-io</code></p>

<p>It gives this error: </p>

<pre class="lang-sh prettyprint-override"><code>An error occurred (IllegalLocationConstraintException) when calling
the CreateBucket operation: The unspecified location constraint is
incompatible for the region specific endpoint this request was sent
to.
</code></pre>

<p>I set the region using <code>aws configure</code> to <code>eu-west-1</code> </p>

<pre><code>Default region name [eu-west-1]: 
</code></pre>

<p>but it gives the same error. How do I solve this?</p>

<p>I use osx terminal to connect aws </p>

<p>try this:</p>

<pre><code>aws s3api create-bucket --bucket kubernetes-aws-wthamira-io --create-bucket-configuration LocationConstraint=eu-west-1
</code></pre>

<p>Regions outside of <code>us-east-1</code> require the appropriate <code>LocationConstraint</code> to be specified in order to create the bucket in the desired region.</p>

<p><a href="https://docs.aws.amazon.com/cli/latest/reference/s3api/create-bucket.html" rel="noreferrer">https://docs.aws.amazon.com/cli/latest/reference/s3api/create-bucket.html</a></p>
