Error after hosting the website using AWS Amplify - amazon-web-services

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!

Related

Deploying a project via AWS - Vue.js (Nuxt Framework) / Backend - Java SpringBoot

My workplace gave me a task to configure servers myself for the upcoming project, which I am glad to carry out... if I knew how to do so! A minimal deployment would do the job alright, since there won't be too much web traffic.
So far I found that .. according to references like these..
https://aws.plainenglish.io/how-to-deploy-a-spring-boot-and-vue-application-on-aws-ec2-using-docker-dde22ca15063
For frontend (Nuxt Vue.js)
get the dist folder and upload it to AWS S3 as a static website
Or deploy the frontend by preparing NginX on AWS EC2.
Currently, I am not so sure what are the differences betweeen the two and which approach I should take.
Equally unsure part is how the static website can be connected to the deployed backend
(just by using axios?)
For backend (Java SpringBoot),
take the compiled jar file and deploy it on AWS EC2 where the backend service would be Docker imagefied.
Here, I am very fuzzy about using Docker. All I know is how a web service can be imagefied and published on DockerHub.
It seems there are multiple ways to deploy your web services on AWS.
If someone could provide a proven way or a detailed reference of deploying a Nuxt Vue.js + Java SpringBoot on AWS that actually works, that would be awesome!
But actually I would greatly appreciate any input that suggests a direction.. :)

Can I use fire base to host my flutter web app while still using AWS amplify for Cognito and DataStore

Hi I was wondering if it was possible to host my flutter Web app on Firebase while using AWS Amplify for its DataStore and Cognito services or does AWS NOT support Flutter Web at all yet. Im having issues hosting it on Amplify and was wondering if there were any solutions.
After you build it, a Flutter web app is just a bunch of HTML and JavaScript, so you can serve it from any hosting platform. And once the JavaScript runs in the browser, it can connect to any service.
If you're having trouble making something work, we can typically help better if you show us the minimal information that is needed to reproduce where you are stuck.

Amazon S3 Web Server?

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.

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

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.