S3 copyObject method not working

Issue #9 resolved
Adrian Ambrus created an issue

During the use of localstack with the Java AWS SDK I faced the following problem: the copyObject returns NoSuchBucket error with 404.

I saw that localstack is using boto and boto should support the copy operation.

Comments (4)

  1. Waldemar Hummer Account Deactivated

    Thanks for reporting. Can you please provide the exact steps to reproduce, as well as your environment details (version of the AWS SDK version, etc).

    Before calling the copyObject method in your code, did you make sure that 1) the bucket gets created, and 2) the object that should be copied gets created?

    Running a quick test, the following commands are working locally. The last command (cp from s3://... to s3://...) should hit the same API endpoint in LocalStack as the copyObject method in your test code.

    aws s3 --endpoint-url=http://localhost:4572 mb s3://mybucket
    echo 'hello' > /tmp/foobar
    aws s3 --endpoint-url=http://localhost:4572 cp /tmp/foobar s3://mybucket/foo
    aws s3 --endpoint-url=http://localhost:4572 cp s3://mybucket/foo s3://mybucket/bar
    
  2. Waldemar Hummer Account Deactivated

    Thanks for fixing this on moto side. We will bump the version number once moto publishes their next release. Closing this issue for now.

  3. Log in to comment