The authorization header is malformed; the region ‘us-east-1’ is wrong; expecting ‘eu-central-1’


using Node.JS with the following config file

“accessKeyId” :”XXX”,
“secretAccessKey” :”XXXX”,
“region”: “eu-central-1”,
“signatureVersion”: “v4”

I still receive this error message as if the aws sdk tries to access a us-east-1 region .

Any idea ?


According to AWS, there are three situations this can happen.

  1. When you are creating a bucket with a name that this already being used as a bucket name in your AWS account or in any other AWS account
    (Please note that S3 bucket names are globally unique).
  2. When you are doing an operation on your S3 bucket and you have set the Region variable (either when configuring the SDK or while using
    environment variables etc) to a region other than the one in which the
    bucket is actually present.
  3. You have recently deleted a S3 bucket in a particular region (say us-east-1) and you are trying to create a bucket (with the same name
    as the the bucket that was deleted) in another region right after
    deleting the bucket.

For point 3, give up to two days and retry.

if a bucket which is present in a certain region say (us-east-1) is
deleted, you can always create a bucket with the same name in another
region. There is no such restriction in S3 that states you cannot do
this. However, you will be able to do this only after you allow some
time after deleting the bucket. This is because S3 buckets follow the
Eventual Consistency model in the case of DELETE operation.

It means that after you delete a bucket, it takes a few hours,
generally up-to 24 to 48 hours for the DELETE operation to be
replicated across all our data centres. Once this change has
propagated you can go ahead and create the bucket again in the desired

Leave a Reply