4

I have set up a daily backup script in my aws china instance which uploads my required files to be backed-up to s3 bucket. I have a restoration script which uses s3api to restore the objects to the instances.

The command used to get the file is aws s3api get-object, but I get the following error once I run the command.

A client error (MethodNotAllowed) occurred when calling the GetObject operation: The specified method is not allowed against this resource.

When I use the same command to restore a file in the AWS US East environment, I can restore the file , but cant do the same in the China environment.

I used a similar command aws s3api list-objects which lists out the objects in my bucket. This is working in the US as well as china environment.

I'm confused as to why I can list my objects but cant use the get operation.

Arjun Prasad
  • 163
  • 1
  • 11
  • Generally, AWS regions are not exactly the same, different regions support different services with different features. E.g. Lambda in China does not support environment variables https://docs.amazonaws.cn/en_us/lambda/latest/dg/env_variables.html for s3api it may be the same. See this page https://docs.amazonaws.cn/en_us/aws/latest/userguide/s3.html also try to specify region with your command. Some actions default to us-east-1 and it will not work and will throw a strange error. – Petr Chloupek Oct 19 '19 at 10:21

0 Answers0