After successfully uploading a file, I’m attempting to copy it to another key (s3.CopyObject) within same bucket. Unfortunately, I’m getting NoSuchBucket
error.
The same script is working fine with real S3 credentials + endpoint.
Do my logs give any indication to the possible reason for the error?
integration-localstack-1 | 2023-12-04T20:02:37.456 DEBUG --- [ asgi_gw_1] l.aws.serving.wsgi : GET localhost.localstack.cloud:4566/_localstack/health
integration-localstack-1 | 2023-12-04T20:02:38.397 DEBUG --- [ asgi_gw_0] l.aws.serving.wsgi : PUT host.docker.internal:4566/order-source-data/cache/9483623b6076232cd76aef52801c443d.json
integration-localstack-1 | 2023-12-04T20:02:38.398 DEBUG --- [ asgi_gw_0] l.aws.protocol.serializer : Determined accept type (None) is not supported by this serializer. Using default of this serializer: application/xml
integration-localstack-1 | 2023-12-04T20:02:38.398 INFO --- [ asgi_gw_0] localstack.request.aws : AWS s3.PutObject => 200; 000000000042/us-east-1; PutObjectRequest({'ACL': None, 'Bucket': 'order-source-data', 'CacheControl': None, 'ContentDisposition': 'inline; filename="order-231204150233-190.json"; filename*=UTF-8\'\'order-231204150233-190.json', 'ContentEncoding': None, 'ContentLanguage': None, 'ContentLength': 330, 'ContentMD5': 'oAzC5jzdQcYerDIBHkBBEA==', 'ContentType': None, 'ChecksumAlgorithm': None, 'ChecksumCRC32': None, 'ChecksumCRC32C': None, 'ChecksumSHA1': None, 'ChecksumSHA256': None, 'Expires': None, 'GrantFullControl': None, 'GrantRead': None, 'GrantReadACP': None, 'GrantWriteACP': None, 'Key': 'cache/9483623b6076232cd76aef52801c443d.json', 'Metadata': {}, 'ServerSideEncryption': None, 'StorageClass': None, 'WebsiteRedirectLocation': None, 'SSECustomerAlgorithm': None, 'SSECustomerKey': None, 'SSECustomerKeyMD5': None, 'SSEKMSKeyId': None, 'SSEKMSEncryptionContext': None, 'BucketKeyEnabled': None, 'RequestPayer': None, 'Tagging': None, 'ObjectLockMode': None, 'ObjectLockRetainUntilDate': None, 'ObjectLockLegalHoldStatus': None, 'ExpectedBucketOwner': None, 'Body': <_io.BufferedReader>}, headers={'Accept-Encoding': '', 'Content-Disposition': 'inline; filename="order-231204150233-190.json"; filename*=UTF-8\'\'order-231204150233-190.json', 'Expect': '100-continue', 'Content-Md5': 'oAzC5jzdQcYerDIBHkBBEA==', 'User-Agent': 'aws-sdk-ruby3/3.190.0 ua/2.0 api/s3#1.141.0 os/macos#22 md/arm64 lang/ruby#3.1.2 md/3.1.2 cfg/retry-mode#legacy ft/resource', 'Host': 'host.docker.internal:4566', 'X-Amz-Date': '20231204T200238Z', 'X-Amz-Content-Sha256': '36f88290181ac7af7eed674761e237d45b2473e5c6c99799ef7e14eb975045cd', 'Authorization': 'AWS4-HMAC-SHA256 Credential=LSIAQAAAAAAVNCBMPNSG/20231204/us-east-1/s3/aws4_request, SignedHeaders=content-disposition;content-md5;host;x-amz-content-sha256;x-amz-date, Signature=b13251477c3c60c69431095a8f6fc6f26dc1c434a5f7aed34166dd69199c98d1', 'Content-Length': '330', 'Accept': '*/*', 'x-localstack-tgt-api': 's3', 'x-moto-account-id': '000000000042'}); PutObjectOutput({'ETag': '"a00cc2e63cdd41c61eac32011e404110"', 'ServerSideEncryption': 'AES256'}, headers={'Content-Type': 'application/xml', 'ETag': '"a00cc2e63cdd41c61eac32011e404110"', 'x-amz-server-side-encryption': 'AES256', 'x-amz-request-id': '0d159dba-4c29-4f14-a8b9-6c111b3c4bf0', 'x-amz-id-2': 's9lzHYrFp76ZVxRcpX9+5cjAnEH2ROuNkd2BHfIa6UkFVdtjf5mKR3/eTPFvsiP/XV/VLi31234=', 'Connection': 'close'})
integration-localstack-1 | 2023-12-04T20:02:38.450 DEBUG --- [ asgi_gw_1] l.aws.serving.wsgi : PUT host.docker.internal:4566/order-source-data/7c48de5958df44c67330d53994da749a.json
integration-localstack-1 | 2023-12-04T20:02:38.451 DEBUG --- [ asgi_gw_1] l.aws.protocol.serializer : Determined accept type (None) is not supported by this serializer. Using default of this serializer: application/xml
integration-localstack-1 | 2023-12-04T20:02:38.451 INFO --- [ asgi_gw_1] localstack.request.aws : AWS s3.CopyObject => 404 (NoSuchBucket); 000000000042/us-east-1; CopyObjectRequest({'ACL': None, 'Bucket': 'order-source-data', 'CacheControl': None, 'ChecksumAlgorithm': None, 'ContentDisposition': 'inline; filename="order-231204150233-190.json"; filename*=UTF-8\'\'order-231204150233-190.json', 'ContentEncoding': None, 'ContentLanguage': None, 'ContentType': None, 'CopySource': 'order-source-data/cache/9483623b6076232cd76aef52801c443d.json', 'CopySourceIfMatch': None, 'CopySourceIfModifiedSince': None, 'CopySourceIfNoneMatch': None, 'CopySourceIfUnmodifiedSince': None, 'Expires': None, 'GrantFullControl': None, 'GrantRead': None, 'GrantReadACP': None, 'GrantWriteACP': None, 'Key': '7c48de5958df44c67330d53994da749a.json', 'Metadata': {}, 'MetadataDirective': 'REPLACE', 'TaggingDirective': None, 'ServerSideEncryption': None, 'StorageClass': None, 'WebsiteRedirectLocation': None, 'SSECustomerAlgorithm': None, 'SSECustomerKey': None, 'SSECustomerKeyMD5': None, 'SSEKMSKeyId': None, 'SSEKMSEncryptionContext': None, 'BucketKeyEnabled': None, 'CopySourceSSECustomerAlgorithm': None, 'CopySourceSSECustomerKey': None, 'CopySourceSSECustomerKeyMD5': None, 'RequestPayer': None, 'Tagging': None, 'ObjectLockMode': None, 'ObjectLockRetainUntilDate': None, 'ObjectLockLegalHoldStatus': None, 'ExpectedBucketOwner': None, 'ExpectedSourceBucketOwner': None}, headers={'Accept-Encoding': '', 'Content-Disposition': 'inline; filename="order-231204150233-190.json"; filename*=UTF-8\'\'order-231204150233-190.json', 'X-Amz-Copy-Source': 'order-source-data/cache/9483623b6076232cd76aef52801c443d.json', 'X-Amz-Metadata-Directive': 'REPLACE', 'User-Agent': 'aws-sdk-ruby3/3.190.0 ua/2.0 api/s3#1.141.0 os/macos#22 md/arm64 lang/ruby#3.1.2 md/3.1.2 cfg/retry-mode#legacy ft/resource ft/s3-transfer', 'Host': 'host.docker.internal:4566', 'X-Amz-Date': '20231204T200238Z', 'X-Amz-Content-Sha256': 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855', 'Authorization': 'AWS4-HMAC-SHA256 Credential=LSIAQAAAAAAVNCBMPNSG/20231204/us-east-1/s3/aws4_request, SignedHeaders=content-disposition;host;x-amz-content-sha256;x-amz-copy-source;x-amz-date;x-amz-metadata-directive, Signature=6df16ba0fae5c1720039ff0703670fa0066aceb2829b3351d4c395047c3365ec', 'Content-Length': '0', 'Accept': '*/*', 'x-localstack-tgt-api': 's3', 'x-moto-account-id': '000000000042'}); NoSuchBucket(The specified bucket does not exist, headers={'Content-Type': 'application/xml', 'Content-Length': '234', 'x-amz-request-id': '118c3894-f7ff-4e03-9a01-38cb8870487d', 'x-amz-id-2': 's9lzHYrFp76ZVxRcpX9+5cjAnEH2ROuNkd2BHfIa6UkFVdtjf5mKR3/eTPFvsiP/XV/VLi31234=', 'Connection': 'close'})
integration-localstack-1 | 2023-12-04T20:02:47.719 DEBUG --- [ asgi_gw_0] l.aws.serving.wsgi : GET localhost.localstack.cloud:4566/_localstack/health