Firebase projected hosted on AWS? - amazon-web-services

I am trying to build a multi-site platform using flutter and firebase. We are launching the web app version soon. I wanted to see if it is possible to host the web app using AWS instead of firebase hosting? And if so how do you do it?

Technicaly that is possible. The hosting service from Firebase is enabling you "just" to host your website. If you want you can host it whereever you want (own server or even aws). I don't see any reason why it should not work if you just want to host the side.

I hosted an Angular app using Firebase like backend as a service on AWS, so it's possible. In my case, I used Amazon S3 to upload the binaries generated by my Angular app. To deploy a Flutter App, I suggest you follow this article: Build and deploy a Flutter Web app with Amazon S3 and Bitrise

Related

Deploying React App to AWS without S3 static url

I have a React app that is currently hosted in a regular AWS account. I used S3 static URL and cloud front to host the site and deliver it over SSL. I now need to deploy the same app from a gov-cloud instance. Gov-Cloud does NOT have cloudfront available and unfortunately you cant apply SSL to an s3 static URL.
I'm searching for another relatively easy way to deploy this (Amplify is also not available in gov cloud). Elastic Beanstalk is available but it seems like overkill for just hosting a React app (not to mention, I have to set this up in Terraform so configuring EB seems like a way way overkill as there are many options available in EB).
Has anybody done this kind of deployment before or have any suggestions for how to do this? If need be, I'll do it with elastic beanstalk, I just need to research all the options first (unless someone has a golden image type deal for react apps).

How to deploy frontend and backend with the same domain name?

I'm not very familiar with deployment and networking as I'm primarily a frontend developer. I want to create a project with Laravel and React (separated, not integrated with blade), and deploy them to AWS. I want to use Laravel only as an API server, and I'm planning to deploy it on EC2. If I host my React app on S3, how will it be possible for me to share the same domain with the API sever running on the EC2 instance?
I know that I can have separate subdomains,like www.example.com for my React app and api.example.com for my API server. However, if I want to have www.example.com for my React app and www.example.com/api for my API server, what options do I have? And what resources can you recommend for me to get more up to speed on this topic? Thanks!
As you want to use S3 and EC2 you would need to use a service that can distribute to both endpoints based on a condition.
The best service for this would be CloudFront, which supports distribution to S3 and EC2 (as a custom origin).
To do this you would create your distribution with an origin for the S3 bucket, and an origin for the API. As your API is hosted on the /api/* path you would add this as the path pattern when adding the secondary origin via a behaviour.
CloudFront will then route any requests to /api/* paths to your EC2 origin.
I have found an article named How to route to multiple origins with CloudFront which I hope will explain the steps to accomplish this in greater detail.

How to host Angular 6 application in AWS serverless architecture along with domain and SSL?

Our back end Apis are written in AWS serverless architecture, and we are able to access Database from local system and application working properly, But we are no idea about host application on a domain.
This is the architecture that you would normally follow to host angular app along with serverless backend:
Lambda will be used to host the back-end of your application. You can use SAM (serverless application model) or NodeJS Serverless framework to package and deploy the backend.
For front end i.e. Angular, you'll use S3 to host the static files for angular. You'll serve the static files using AWS CloudFront.
For SSL, you'll AWS Certificate Manager (ACM). You'll be able to use SSL certificates hosted on ACM with CloudFront.
For Databases, you can either use RDS (relation) or DynamoDB (non-relational).

Can you use a normal Web Hosting Service to Publish a Flask App?

I have already purchased a Web Hosting service as well as a domain name which is working to display a static coded website but doesn't let me publish a Flask App. Can someone please explain how to deploy a Flask App to the Internet with a domain name
The hosting service needs to support hosting Python applications in the first place. Check out the deployment section in the Flask documentation for hosted options.

How to deploy a multi-tenant django app to AWS?

I have an Django+Postgres app that has a multi-tenant structure and I don't have prior experience deploying this type of app to AWS. I have followed the general Elastic Beanstalk tutorial to deploy a simple app. (https://realpython.com/blog/python/deploying-a-django-app-to-aws-elastic-beanstalk/) However, I am looking for a solution that allows me to more flexibly create different "sites". Currently, I have learned to create different sites via this tutorial (http://mycodesmells.com/post/django-tutorial-multi-tenant-setup).
So i have below questions :
how to deploy this app (I am leaning toward not using Elastic Beanstalk but just deploying it to EC2)
how I could create different sites after deploying this app.
The following should help:
Set up your .ebextensions so your Django project deploys with eb deploy.
Set up django-storages with AWS S3 for mediafiles if you need to.
Purchase a domain and set it up with AWS Route 53 (you can buy via Route 53, too).
Point your root domain alias to your Elastic Beanstalk app.
Point a wildcard domain to your app, too.
Set up AWS SES to save your domain emails to an AWS S3 bucket. You can use other providers as well, SES is just about the easiest.
Provision AWS ACM certificates for HTTPS support.
You now have your site working under .example.com and can use tenant.example.com to refer to a single client's setup - it refers to the same deployment but has a different Host header which lets Django tenant schemas to distinguish clients. You have wildcard forwards and do not need any setup other than in Django for adding new tenants.