Question

I have aws bucket set up in the Oregon region. I also have a domain tied to this bucket so I do not have to enter in the long aws path. I would like to push builds from travis to the s3 bucket. But i get this error

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

Now I did some research and it seems if the bucket was US Region instead then I would be able to use the domain bucket name. I tried to use the long path to access the site but that also doesnt seem to work anymore. I get an xml file instead.

If there way around this so I do not have to recreate the bucket in US Region? And if that does resolve the issue, why? Why do the buckets behave differently?

Thanks

Était-ce utile?

La solution

Yes, you can set the region of the s3 endpoint easily: Here is your build tweaked to set a s3 region and endpoint:

deploy:
    provider: s3
    edge: true
    bucket: "skinnybrit51.com"
    endpoint: "s3-website-us-west-2.amazonaws.com"
    region: "us-west-2"
    upload-dir: "booty-grid"
    skip_cleanup: true
    secret_access_key:
        secure: zDiuEZgn1THVJyvqE4FcKXPXY/Aozy2gm1gHDkHCooVoZuRtU31tz1N6zWp3yVJ3JZFk4zDO7zyWGjtAba5ydh8FNOl+F/L0RVpYfiSpoiJA7PZlXAw1WKPiyY21luCctZeJc/eZry8ZseM190Q+UzbiqLLjtteO1CHeZo3XptM=
    access_key_id:
        secure: yj/T/lSSr1MMyUZMiS2IGqvFG78ExJQi06wxa5+7M2Rfz1G5LaiVH+9mqcE5qVmu1q54/CmwT1OUNdeXy/SUOwre4L7ZshS9LfK/7BcATMjIvCSysNT3AEOIx63NtRWabzQMiQu25h5owVbvwTBMN6N6+C/g5yq46XQsvoy6xz8=
    local-dir: public
    on:
        branch: master
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top