Noob Question - looking for tips, tutorials to set up a photo web site

0

I've hosted content with other ISPs but I'm a total AWS noob so I'm not certain where to begin.

I've got a local version of the site built using PHP, MySQL & jquery. Ideally, I'd like to move this existing content with little or no changes.

I do not anticipate that it'll be a revenue generating site so I'd like to keep it as cheap as possible. ATM, I have 27GB of images but would likely cull that before going live.

Any pointers on where to get started would be greatly appreciated.

TIA

1 Answer
2

Based on your needs, here's a basic outline of AWS services you can use:

  1. EC2 Instance: This will be your virtual server to run your PHP application.
  2. RDS for MySQL: This managed database service will host your MySQL database.
  3. S3: For storing your images and potentially serving them directly.
  4. Route 53: For domain registration and DNS management (optional).

Steps

  1. Create an AWS Account: If you don't have one already, sign up for an AWS account.
  2. Choose an EC2 Instance: Select an appropriate instance type based on your website traffic expectations. For a small, personal website, a t2.micro instance might suffice. Choose an Amazon Machine Image (AMI) with your preferred Linux distribution (e.g., Ubuntu, Amazon Linux).
  3. Configure security groups to allow incoming traffic on port 80 (HTTP) and 443 (HTTPS).
  4. Set Up RDS for MySQL:Create a MySQL database instance.Configure database parameters based on your application's needs.Ensure proper security settings.
  5. Transfer Your Application and Database: Transfer your PHP application files to the EC2 instance using tools like SCP or SFTP.
  6. Import your MySQL database to the RDS instance using tools like the MySQL command-line client or AWS Database Migration Service (DMS) for larger datasets.
  7. Configure Your Application:Update your database connection settings in your PHP application to point to the RDS instance.
  8. Ensure your application can access the S3 bucket for image storage and retrieval.
  9. Upload Images to S3:Create an S3 bucket to store your images.Configure appropriate permissions for the bucket.
  10. Use the AWS CLI or S3 management console to upload your images.
  11. Set Up Domain (Optional):Register a domain with Route 53 (or use an existing one).Create DNS records to point your domain to the EC2 instance's public IP address.

Optimize Performance: 1/ Use content delivery networks (CDNs) like Amazon CloudFront to improve image loading speeds.

2/ Compress images to reduce file size.

3/ Implement caching mechanisms.

profile pictureAWS
answered 4 months ago
profile picture
EXPERT
reviewed 4 months ago
  • I'd also consider to containerize the application, hosting it in ECS with Fargate (to reduce management overhead), and leveraging Aurora MySQL which is a more AWS-native solution. A future solution could also leverage Cloudfront / WAF / Shield for scale and security.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions