# Website with lambda and s3 bucket using serverless framework

**URL:** <https://forum.serverless.com/t/website-with-lambda-and-s3-bucket-using-serverless-framework/18063>\
**Category:** Serverless Framework\
**Tags:** api-gateway\
**Created:** [December 19, 2022, 4:04pm UTC](https://forum.serverless.com/t/website-with-lambda-and-s3-bucket-using-serverless-framework/18063 "2022-12-19T16:04:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![michal1106](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/michal1106/32/7234_2.png) [@michal1106](https://forum.serverless.com/u/michal1106)\
**Post date:** [December 19, 2022, 4:04pm UTC](https://forum.serverless.com/t/website-with-lambda-and-s3-bucket-using-serverless-framework/18063/1 "2022-12-19T16:04:23Z")

</div>

What is the best practice of serverless of **website that serves both lambda and s3**?

We created a website hosting using **serverless-domain-manager** , that supports [deploy multiple micro-services under the same domain](https://serverless.com/blog/api-gateway-multiple-services/)

We used **serverless-apigateway-service-proxy** to **hook the s3 to api gateway** (and in turn to our website)

But something doesn’t seem to work properly (in S3 =\> API Gateway part)

- Image **fails** to be rendered by the browser **from ApiGateway** while it is rendered successfully from s3 url - see links to both images below and try to open them in browser

```auto
https://y5f4ktp7lk.execute-api.us-east-1.amazonaws.com/dev/crs/Scorm1.2_HTML5/assets/toc/tocIcons/searchBtnNormal.png

https://c3-lat-crs-dev.s3.amazonaws.com/Scorm1.2_HTML5/assets/toc/tocIcons/searchBtnNormal.png

```

- ApiGateway ignores **Range header** (`"Range: bytes=0-"`) in request - it returns 200 instead of returning 206 and (might missing additional headers - we tried to tweak the ApiGateway from the AWS Console to return 206 and still the video failed to play through ApiGateway)

So it seems that this **serverless-apigateway-service-proxy plugin is not behaving as pure proxy** …

- is there an easy way to solve it?
- what are the out-of-the-box alternatives to put s3 under a domain that already have lambdas attached to it? by out-of-the-box, I mean it would **just proxy the s3 and return whatever status-code and headers the s3 returns**
