I launched a Docker container for the image localstack/localstack:0.12.9.1.
I opened the internal shell of this container by the command:
docker exec -it <container-name> sh
The next thing I wanted to do is to upload a file to S3 bucket.
I executed the command:
aws s3 cp /my-file.txt s3://my-bucket/. --region local --endpoint-url=http://local
stack:4566
and I got the error message:
upload failed: ../../../my-file.txt to s3://my-bucket/. An error occurred (500) when calling the PutObject operation (reached max retries: 4): Internal Server Error
To be sure that this bucket exists, I executed the command:
aws s3api list-buckets --region local --endpoint-url=http://localstack:4566
and I got:
{
"Buckets": [
{
"Name": "my-bucket",
"CreationDate": "2021-05-14T14:23:03.000Z"
}
],
"Owner": {
"DisplayName": "webfile",
"ID": "bcaf1ffd86f41161ca5fb16fd081034f"
}
}
So the problem is not that the bucket is missing.
Do you know why I cannot upload file to S3?