Amazon S3 Web Server? - amazon-web-services

I am a Computer Science student and I am developing a Flask app and trying to deploy it on the web with Google Compute Engine.
From what I understood, between the end-user (client) and my Flask app, there is at least 2 major elements:
Web-server (NGINX, Apache)
App-Server (Gunicorn, Uwsgi)
Your Python App (Flask)
I went on multiple websites to look what web-servers they were using and I saw a lot of Amazon S3 web-server. Does it means that Amazon has it own Web-Server or they are using NGINX under the wood? I am extremely confused about it.

Amazon S3 is an object storage, quoting from the Hosting a static website on Amazon S3 page:
You can use Amazon S3 to host a static website. On a static website, individual webpages include static content. They might also contain client-side scripts.
By contrast, a dynamic website relies on server-side processing, including server-side scripts such as PHP, JSP, or ASP.NET. Amazon S3 does not support server-side scripting, but AWS has other resources for hosting dynamic websites.
On the other hand, AWS offers a wide range of services to host websites which you can see here.

Related

Error after hosting the website using AWS Amplify

I have recently started to use Amazon Web Services to host a very simple web page using Next JS and React. However, once I hosted it on AWS Amplify I seem to get a 503 error with the message being "The request could not be satisfied." from images that are cached from cloudfront. I'm sorry but I am very new to the whole Amazon Web Services eco-system and as far as what I've heard AWS offers multiple services and is best to use very few services when you initially start.
With that in mind here's a brief run down of what I did:
I used AWS Amplify to deploy my website that has no lambda function. Note that all the images that are being served on the website is from the new <Image /> tag which means that all images are cached in the /.next/data folder.
All images are served from Cloudinary as for now.
I didn't change any other settings after deploying the website.
Any help is greatly appreciated!

Developing a custom SPA for browsing and uploading to S3

Is it possible to deploy an SPA on AWS that calls Amazon S3 APIs?
The SPA will act as a custom S3 browser app, where I want to be able to deploy, delete, etc documents that are stored in a S3 instance.
Thanks
You can certainly deploy a Single Page app written in the language of your choice and then use the corresponding AWS SDK to invoke S3 operations. For example, you can write a SPA in JS that uses the Amazon S3 JavaScript API to perform S3 CRUD operations on Amazon S3 content. Likewise, you can develop a SPA in Java and then use the Java S3 API.
Once you develop your app, you can deploy it to the cloud by deploying it to an EC2 instance. Using Elastic Beanstalk makes it easy to deploy an App to the cloud.
Yes it's possible to deploy a SPA on AWS S3. Adding medium article for reference https://medium.com/#joecrobak/production-deploy-of-a-single-page-app-using-s3-and-cloudfront-d4aa2d170aa3.
Though you need to other AWS services as well like route 53 and cloudfront

How to deploy app with Nginx, React, Webpack, Gunicorn, PostgreSQL, Django & DRF on AWS Elastic Beanstalk? How to handle static files with this app?

I'm new to AWS environment. I've few questions regarding AWS deployment. An important point to remember here is that I am using free tier of AWS. So I've limitations about resources.
Question1:
I've developed a web app on my local server (using VM with centos Linux) which uses React-SSR for the frontend using Express server. React CSR and SSR is generated using webpack. Backend uses Django as main framework, postgreSQL for database. Frontend and backend communicate with the help of Django Rest Framework. Gunicorn is used to run backend server. I want to use Nginx as reverse proxy server. How can I deploy this app on AWS Elastic Beanstalk? Can Amazon S3 be used to run React-SSR frontend?
Question 2:
This app serves images which'll be uploaded through backend. What's the proper way to handle images and static files with this kind of app? Should images be handled by nginx, react or django? How should I configure Django so that it stores image paths properly in its model(ImageField is used)? Where does Amazon S3 fit in this?
Question 3:
Can this app be made region agnostic under free tier?
The answer to the first question: React can be deployed on AWS S3, if you configure webpack for generate static files (HTML + CSS + JS), or use the NextJS for generate static on build.
The answer to the second question: To use AWS S3 for storing statiс use django-storages

AWS choices for single microservice (spring boot) for Angular 7 client

I'm relatively new to AWS and wanted suggestions about the best options for my needs. I have a single spring boot API that is to be accessible only to my angular 7 client. The client will go in an S3 bucket. I need suggestions for how to host the API (it needs a MySQL autogenerated db).
So far I have seen ECS vs Elastic Beanstalk vs. Amplify. Can someone experienced suggest me an option that won't be overkill for this small project? The API could be called frequently depending on traffic to the client.
If you have suggestions from Azure or Google Cloud Platform those would be welcome too.
Thank you!
AWS provides the EC2 service where you can create an instance (virtual machine) and install/deploy manually your application and all the required software. For personal or very small projects this can be an option, but you should consider that your backend will not be able to scale to more instances automatically (or by configuration), you will have to take care of the configuration and backups of your database, etc.
For production-grade applications there are a lot of advantages of separating your application components, using a specific service for each component.
Given your application stack, I would recommend considering this approach:
Create a relational DB with AWS RDS
Deploy your Spring backend to AWS Beanstalk
Deploy your Angular frontend to AWS S3 (it can be served as static content)
Create a CloudFront distribution with two origins, to route the requests that must be delivered to backend (usually using a URL convention like /api/) and frontend ()

Amazon SimpleDB Web Page Application

I am a new developer to the AWS cloud. I am writing an Android App that interfaces with the SimpleDB. I have found many references and have successfully interfaced my app with the SimpleDB using the AWS SDK and using the anonymous TVM - works great.
The problem is I will need a web site to interface to the same data via AWS SimpleDB. The web site also needs to interface with Google Maps. For the first phase, the site can be completely private, but down the road I would want to be able to make the site available to the public, utilizing one set of security Credentials.
After reading some of the documentation - I am extremely confused about how to do this. Do I need to host the site on AWS? Which API do I use that could interface with my web site code-mostly JQUERY and JavaScript? I see there is a PHP API? (Not too familiar with PHP) I saw some examples using REST calls via AJAX. If anyone has any feedback or simple examples, or explanations that would be great.
Yes, you should host your web site on an EC2 instance (although you can host it on any other server or hosting service).
Your site should also integrate with AWS services, like SimpleDB or DynamoDB.
It will be easier for you to start with Node.js that will run your JQuery and other JavaScript code natively. Check out the new SDK for Node.js.
If you have a static site of mostly js and HTML, you can use amazon s3 to host your site.