Question regarding S3 assets and which url to use. #1638
-
Hi! I'm pretty new to lambda and php, so hope to get some questions answered here. Setup
I've installed the constructs:
website:
type: server-side-website
assets:
'/dist/*': public/dist/ Right now, after deploying my app using ~/www/site
❯ serverless deploy
Deploying app to stage dev (us-east-1)
✔ Service deployed to stack app-dev (315s)
endpoint: ANY - https://j6anl9xtbc.execute-api.us-east-1.amazonaws.com
functions:
app: app-dev-app (1.7 MB)
website:
url: https://dsdi2l6rwp34qk.cloudfront.net
cname: dsdi2l6rwp34qk.cloudfront.net
Want a better experience than the AWS console? Try out https://dashboard.bref.sh The problem:My app can't access the assets when accessed through this url: But it works using this cloudfront one: I've obstructed the urls, so you can't test with those urls atm. Any particular reason for this? Should I be concerned about this or simply use the cloudfront url? Hope you can help me 😄 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi, indeed you should not use the first URL (it's the URL for API Gateway). The second is the right one! |
Beta Was this translation helpful? Give feedback.
Hi, indeed you should not use the first URL (it's the URL for API Gateway). The second is the right one!