# Serve static content from serverless AWS lambda function

**URL:** <https://forum.serverless.com/t/serve-static-content-from-serverless-aws-lambda-function/9904>\
**Category:** Serverless Framework\
**Tags:** lambda\
**Created:** [November 19, 2019, 5:00am UTC](https://forum.serverless.com/t/serve-static-content-from-serverless-aws-lambda-function/9904 "2019-11-19T05:00:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![xameeramir](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/xameeramir/32/3715_2.png) [@xameeramir](https://forum.serverless.com/u/xameeramir)\
**Post date:** [November 19, 2019, 5:00am UTC](https://forum.serverless.com/t/serve-static-content-from-serverless-aws-lambda-function/9904/1 "2019-11-19T05:00:33Z")

</div>

We have an express+React typescript app that is executed from a serverless endpoint which is intended to ultimately move to AWS lambda.

The React bundle is served as [static content](https://stackoverflow.com/a/43312722/2404470) along with its `css` , `js` etc files.

[React app is hosted inside a single serverless project](https://dev.to/adnanrahic/a-crash-course-on-serverless-side-rendering-with-reactjs-nextjs-and-aws-lambda-13ed). The same is exposed from `serverless.yml` config as a function named `static-router` :

```auto
static-router:
    handler: src/server.handler
    events:
      - http: ANY / 
      - http: ANY /{proxy+} 

```

So, on my local, it works absolutely fine! All the static content along with the `index.html` are getting served to the browser using [`serverless-offline`](https://www.npmjs.com/package/serverless-offline)

[![Static content served](https://i.stack.imgur.com/jYfq6.png)](https://i.stack.imgur.com/jYfq6.png)

However when I push the same to AWS using `serverless deploy` - all the static content is not getting served. Refer to this link: [https://xjfxfyosml.execute-api.ap-south-1.amazonaws.com/dev/](https://xjfxfyosml.execute-api.ap-south-1.amazonaws.com/dev/)

How do I allow serving static content from the Lambda function which were working perfectly on my local?

What is missing here?
