1

How to use same domain name for front end and for lambda function endpoints for Serverless framework ?

I am using reactjs for frontend design and for frontend hosting I am using s3 and Aws Dynamodb for lambda functions.

Rahul
  • 89
  • 1
  • 1
  • 10
  • Possible duplicate of [Deploying react-redux app in AWS S3](https://stackoverflow.com/questions/39783099/deploying-react-redux-app-in-aws-s3) – Syed Qamar Abbas Mar 28 '18 at 10:38

1 Answers1

0

We do the same in our systems, AWS solved it long time back.

It is the cloud service called CloudFront, which lets you connect multiple origins including external origins that are outside of AWS cloud.

Created a simple architecture diagram to help you view the same.

enter image description here

Hope it helps.

Kannaiyan
  • 10,588
  • 2
  • 35
  • 69
  • Thanks for reply !! Is there any other option other than cloudFront – Rahul Mar 28 '18 at 14:01
  • There are 100 thousand ways to solve this problem. This is the best I could think of in AWS. – Kannaiyan Mar 28 '18 at 14:07
  • I have configured cloud front as you ( @Kannaiyan ) mention above and my website working fine but I am getting {"message":"Missing Authentication Token"} for apis – Rahul Mar 29 '18 at 10:33
  • That is outside the scope of this question. Check it out on other forums. https://forums.aws.amazon.com/thread.jspa?threadID=192977 – Kannaiyan Mar 29 '18 at 18:53