I have a web architecture using Apache as front-end and Nodejs as back-end. I want to migrate this architecture to AWS. Node.js is going to be an Elastic Beanstalk and Apache will be stored on Amazon S3 (it stores only static files).
I use these directives to map the /api URL path to the back-end in Apache :
<Location /api>
ProxyPass http://localhost:8081/api
</Location>
I would like to use the same mechanism in AWS. I found out that Amazon S3 is not going to be able to do this since it is only a storage service.
I found out that Amazon CloudFront
can use multiples Amazon CloudFront
Origins that can be Amazon S3
buckets or Amazon Elastic Load Balancers
. Then, I would use an Amazon EC2
to host my Node.js application back-end with an Amazon Load Balancer
The final architecture would then be
- Amazon Elastic Load Balancer -> Amazon EC2
/api /
/
-->Amazon CloudFront-<
\
else \
- Amazon S3
Does this type of architecture is possible ? If yes, is it the best way to achieve this kind of architecture in AWS ?
Thanks everybody for your responses !