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
Related
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!
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.
So I am thinking of migrating my website to Amazon S3 since it's super cheap and fast, however, I use PHP and AJAX to submit my contact forms. Would it be possible to host my site using AWS S3 and then send all HTTP POSTs to the EC2 instance?
Yes, this is very well possible. However, if you're running an EC2 instance anyways and your traffic is not enormous, you might as well serve your static files from your EC2 instance.
It is not possible to host php site on AWS S3 only static content like images, css or js can be put their.
For dynamic content you have to make use of aws instance.
https://forums.aws.amazon.com/message.jspa?messageID=453142
Correct Usage of Amazon Web Services S3 for Server - Side Scripting
I am new to AWS elastic beanstalk. I have deployed the Parse example server using deploy to AWS button in the Parse Server Example Link. I want to update the cloud code in main.js but I don't know how can I deploy the cloud code the way I was deploying with Parse in terminal.commands applied .I am trying to upload cloud code but its not updating I used eb init,eb create,eb deploy from parse server folder but after is run eb deploy its updating but application version is creating but cloud code is not updated..Could anyone help me out with another solution?
I have a simple PHP application, which doesn't use any database, or anything else. I have a script, which asks me for version name and than creates ZIP with the site and upload via the web interface.
Can I upload to ElasticBeanstalk via let's say SSH?
Yes, with the Elastic Beanstalk Configuration Files.