Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AccessDenied error for S3 buckets hosting a website #12

Open
mstn opened this issue Dec 9, 2019 · 1 comment
Open

AccessDenied error for S3 buckets hosting a website #12

mstn opened this issue Dec 9, 2019 · 1 comment

Comments

@mstn
Copy link

mstn commented Dec 9, 2019

Hello!

I am using this component in combination with @serverless/website. In particular, I want to use https for an S3 website bucket and Cloudfront seems the best option.

My serverless.yml looks like

website:
  component: "@serverless/website"
  ...

secureWebsite:
  component: '@serverless/aws-cloudfront'
  inputs:
    ...
    origins:
      - ${website.url}

Apparently (see code), if originUrl is an S3 bucket url, the input url is replaced with ${bucketName}.s3.amazonaws.com.

In this way, when I try to access the website via cloudfront url I get an AccessDenied error. If I replace by hand in AWS the url with the original one ${website.url} (e.g, bucket-name-xxx.s3-website.my-region.amazonaws.com, it works as expected.

@mstn
Copy link
Author

mstn commented Mar 10, 2020

@eahefnawy what do you think about this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant