How would you put an API in the air along with a front end?
Example:
I have an application in Angular JS A SPA and it has an API that needs a database, so how would I do? Would you create an EC2 instance and a routing?
How would you put an API in the air along with a front end?
Example:
I have an application in Angular JS A SPA and it has an API that needs a database, so how would I do? Would you create an EC2 instance and a routing?
If you really want to use AWS, I suggest the following:
Upload an instance that is part of Free Tier , so you have a year of testing (if you no longer have used) and place your application. Remember to update the security group
of the instance to allow access only to the required ports and also do not allow access to port 22 from any source, put your current IP.
Still on the instance, it will already have an associated public IP, but this IP will change if the machine is turned off, if it is restarted the IP remains the same. If you want to have a fixed public IP, you must use Elastic IP .
For the database you can use RDS but it is very expensive and you can solve this situation by placing the your bank in another instance or even in the same instance of your application, which I do not recommend. The advantage of using RDS and the reason for its high cost is that Amazon is responsible for generating backups and keeping your database always up to date, having the least involvement on your part besides giving you the option of Multi AZ where you will have your bank available in different zones, giving you more security.
You can create a domain and configure it to point to the public IP of your machine.
If you have more than one instance running your application, you can create a Elastic Load Balancer (ELB) , it will have a DNS and you can use it but you can not use the IPs as they change.
Could you be more specific? What database do you need to host too, or just external access?
If the site is "static", ie just with Javascript and the like, you do not need an EC2 instance to host, you can leave it in S3 and make it public.
If it is "dynamic" and needs some server processing the response to clients, then yes use an EC2 instance and install whatever needs to be run on it.