how to link between S3 and RDS

0

I created html(form.php) code and in that only name and email id. I want to create a database of whoever submits the form. while i have uploaded form.php in s3. so how to link to RDS?

質問済み 1年前284ビュー
3回答
1
承認された回答

Hi,

You could create an API via API Gateway, which then stores the user information on RDS

profile picture
エキスパート
回答済み 1年前
profile pictureAWS
エキスパート
レビュー済み 1年前
1

S3 does not support server side scripting. It can only host static pages.

Php is dynamic content which requires server side scripting which will not work in S3 bucket.

What your trying to accomplish is not technically possible.

profile picture
エキスパート
回答済み 1年前
1

Amazon S3 is a storage service, and it's typically not used to host server-side scripts such as PHP. PHP scripts require a server to process requests, and S3 is not designed to serve this purpose. Instead, S3 stores and retrieves static files like HTML, CSS, JavaScript, images, etc. So how do you do that on AWS? You can:

  1. Host your PHP form on an EC2 instance, not S3.
  2. Install a web server (like Apache) and PHP on your EC2.
  3. Ensure your RDS security group allows connections from your EC2.
  4. Use PHP's mysqli or PDO to connect to the RDS and store the form data.

I hope this helps

profile picture
回答済み 1年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ