aws-samples / aws-serverless-nextcloud

moved - https://github.com/f7o/aws-serverless-nextcloud
MIT No Attribution
86 stars 25 forks source link

The bucket you are attempting to access must be addressed using the specified endpoint #3

Closed ChristianKniep closed 3 years ago

ChristianKniep commented 3 years ago

When trying to deploy the stack I get this error message in the VpcStack deployment:

S3 error: The bucket you are attempting to access must be addressed using the specified endpoint. 
Please send all future requests to this endpoint. For more information check 
http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html

I am using the following commands to package and deploy.

aws cloudformation package \
      --template-file ecs-nextcloud.yml --s3-bucket <my-bucket> \
      --output-template-file packaged.yaml

and deploy

aws cloudformation deploy --template-file packaged.yaml --stack-name nextcloud-test-env \
      --parameter-overrides DbPassword=<dbpass> NextCloudAdminPassword=<adminpass> \
       Route53Zone=<zoneid> Domain=nc.<example.com> IsolationLevel=Public --capabilities CAPABILITY_IAM

Not sure what I am missing here. I would like to deploy 22.0.0. I figure hat the error might stem from my AWS_REGION selection, which is eu-west-1.

ChristianKniep commented 3 years ago

Ok, might happen that the stack is only available in eu-central-1?

f7o commented 3 years ago

Can you please check to have every piece in one single region. This error occurs mainly when the CloudFormation package command or S3 asset bucket is deployed in a different region as the actual CloudFormation stack.

In the list of error messages (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html) you can see that this message indicated CloudFormation got a PermanentRedirect from S3. This comes from a bucket in a different region and is not supported by CloudFormation.

The template is tested in multiple regions including eu-west-1.

ChristianKniep commented 3 years ago

Ah right, that makes sense. I created the bucket with the assets in eu-central-1. Thanks!