What is the best option to deploy Next.js and Strapi projects to AWS? - amazon-web-services

Please understand that I am using a translator because I can't speak English.
I want to use Strapi to configure API Server, receive APIs using Nextjs, and create a website that expresses news articles.
News articles are registered daily using the Strapi management panel, and Nextjs should reflect them in real time.
Next.js will also include the ability for users to register, modify, and delete posts. (Board)
Also, in the Expo React Native App, data must be received from Strapi to the API and displayed.
Cloud services must use AWS.
In addition, after development in the local development environment, it must be reviewed by the customer at the test server and updated to the production environment after that.
Therefore, I think we need at least two management servers.
S3 and RDS should also be used.
It's not a very large site.
There are not many users yet.
If I need a docker, I will use it.
Frontend(Next.js)
Amplify
Docker -> App Runner
Docker -> Fargate
EC2
Backend(Strapi)
Amplify
Docker -> App Runner
Docker -> Fargate
EC2
Help me Please!

Related

Can Amazon Chime be deployed and run on a third-party VPS? And how?

In the examples of Amazon Chime, for instance here https://github.com/aws-samples/amazon-chime-sdk-classroom-demo, they imply that it should be deployed and run on a AWS server via Cloud9. However, I want to deploy and run it on some other VPS such as a digitalocean or linode server.
The main question: can that be done at all, it is supported?
If yes, how? General pointers. Which example should I use and where is it described at all?
Eventually what I want is this:
Say, I have a teaching website that I run on digital ocean or linode. Not on AWS. I want to be able to use Amazon Chime in a way that my users will go to my website and connect to a video class from my website as well
The Chime service would need run on AWS, but you can have a link to the Chime service endpoint from any website hosted anywhere else.
To use the Amazon Chime web application, your students would sign in to https://app.chime.aws/ from your web browser. You would have that link on your website.
See https://docs.aws.amazon.com/chime/latest/ug/chime-web-app.html
Note about the demo. The demo shows how to use the Amazon Chime SDK to build an online classroom in Electron and React. If you are are using that deployment method you can host the React app anywhere under a private domain on any host. That app will run any where, while connecting back to the AWS service endpoint.
Resources would be deployed in AWS. No way around it.
Deployment script can be run from your own laptop, Cloud9 and/or any other Linux server. You just need to be able to run git clone and script/deploy.js.
You'll also need to make that environment is configured with appropriate AWS credentials. Cloud9 would have these credentials out of the box. For any other environment (your laptop/Digital Ocean VM etc.) would need to get AWS Account Ket/Secret pair and use aws config to enable them.

How to autodeploy Django in EC2 and React in S3

I have an app created in Django and React, but there are few problems that I am facing :-
As I will have a large database(postgres) exclusily for a single user, I am creating different AWS EC2 instance for every user.
Whenever there is a new user then I have to go and manually install postgres, setup nginx and other important things and this is just for Django in EC2. Then I setup ReactJS frontend in Amazon S3.
How can i automate this so that when a paid user signs up, everything happens automatically.
The following should happen automatically:
- Automatically create a new EC2 instance, and deploy backend (This including installing several libraries, Postgres, Redis, async task queue (We use Huey which is like Celery), making migrations and other trivial stuff)
- Automatically make an S3 bucket and deploy frontend for the user. We will have to setup domains .etc for this.
Would like to know your inputs on how to approach this problem.

Launching an EC-2 Instance for S3 Bucket

I'm new to web dev and created a site using an S3 bucket that works and is live online. However, I realized that since I'm trying to run a PHP script I found online for a contact form, the site is not truly static so the form will not work. The form is called like this in the html code:
<form name="htmlform" method="post" action="html_form_send.php">
Currently when I try to run this, I get a 405 method not allowed error. Is there a way I can get this code to run? I've done some research online that mentions I have to create an EC2 instance, but I'm overwhelmed by which AMI to choose and don't know how to get the instance connected to the bucket. Can anyone help, or at least does anyone have a resource I could look at to figure this out? Thanks!
The easiest way to deploy your PHP app in AWS is using Elastic Beanstalk.
Elastic Beanstalk for PHP makes it easy to deploy, manage, and scale
your PHP web applications using Amazon Web Services. Elastic Beanstalk
for PHP is available to anyone developing or hosting a web application
using PHP.
Elastic Beanstalk provides configuration options that you can use to
customize the software that runs on the EC2 instances in your Elastic
Beanstalk environment. You can configure environment variables needed
by your application, enable log rotation to Amazon S3, and set common
PHP initialization settings.
Reference: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_PHP_eb.html

AWS Mobile Hub Environments

I'm currently working through my first AWS Mobile Hub project, and it's going pretty well so far. However one thing which is unclear is how "production" deployments are managed.
My Mobile Hub project is using features including:
Sign In (Cognito)
NoSQL Database (DynamoDB)
Cloud Logic (API Gateway & Lambda)
Is there any way to make a distinction between a "development" and "production" environment?
For example, maintain a separate "Users" DB for development and production, and if so, how would i configure the app code (React Native) to know which DB / environment to talk to.
Similarly for API Gateway, i can see that it has created a "Development" stage, but it's not clear whether i should be pointing my production iOS/Android build directly at this Development stage, or if i should be deploying a "production stage", and again, if so, how would i integrate this environment specific switching login in my app code.
Thanks in advance!
I don't know if there is a simple distinction but there are some options I have seen in the docs.
Detach from existing awsmobile project
awsmobile init --remove
Attach to new existing awsmobile project
awsmobile init <awsmobile-project-id>
Track the ids of the environments when you deploy.
Mobile ID
https://console.aws.amazon.com/mobilehub/home?region=us-east-1#/[awsmobile-project-id]/build

can I customize in odoo apps after deploying to google cloud

I'm new to google Cloud and Odoo ERP,I need to customize in 2 odoo apps Fleet and CRM, Can I customize after deploying odoo via Bitnami Lunchpad to Google Cloud, or I need to customize in local virtual machine, and Can I upload local virtual machine to google cloud or only can deploy odoo to Google via Bitnami Lunchpad.
Can Google endpoints access postgreSQL of odoo server
Any help is welcome, Thank you.
For Google Cloud Endpoints, it sits in front of your app. You can get the general architecture idea from these links depending on what platform you are choosing to use:
https://cloud.google.com/endpoints/docs/openapi/architecture-overview
https://cloud.google.com/endpoints/docs/frameworks/about-cloud-endpoints-frameworks
Since Google Cloud Endpoints sits in front of your app and forwards requests to your app, your app is still responsible for handling the requests. This would include things like accessing PostreSQL. Therefore, as long as your app can access PostgreSql, using Google Cloud Endpoints should not restrict your usage.