Posts

Using AWS EC2 and RDS to implement WordPress

Image
🔅 Create an AWS EC2 instance 🔅 Configure the instance with Apache Webserver. 🔅 Download php application name "WordPress". 🔅 As wordpress stores data at the backend in MySQL Database server. Therefore, you need to setup a MySQL server using AWS RDS service using Free Tier. 🔅 Provide the endpoint/connection string to the WordPress application to make it work. Creating AWS EC2 Instance Select the EC2 service in AWS console Press the button "Launch instance" I selected the Amazon Linux AMI I chose "t2.micro" as the instance type I am leaving the instance details to default I am using the minimum storage required for the instance I added the tag with key as Name and value as WordPress I allowed all kind of traffic through Security Group At last launch the instance I have used an existing key pair for the instance The instance is launched successfully and is in running state By clicking on the instance ID all the details will be displayed Username, IP addre...

Create High Availability Architecture with AWS CLI

Image
 Things to be achieved Webserver configured on EC2 Instance Document Root(/var/www/html) made persistent by mounting on EBS Block Device. Static objects used in code such as pictures stored in S3 Setting up Content Delivery Network using CloudFront and using the origin domain as S3 bucket. Finally, place the Cloud Front URL on the web app code for security and low latency. First, Install httpd software by yum command. Launching a EC2 instance Creating volume for persistent storage Attaching volume to the instance document root Creating a S3 bucket Copying image to S3 bucket and making it public Creating CloudFront Using the CloudFront URL Configuring the httpd server     yum install httpd     systemctl start httpd

AWS CLI Launching Instance and attaching Block Storage to the Instance

Image
Creating a AWS key pair in CLI This is the command to create a key pair for AWS instance. Here aws specifies command, ec2 specifies the service, create-key-pair is the command, --key-name is the sub command, aws_instance_key is the parameter. After the key has been created the key will be displayed in the form of JSON. Creating security group in CLI This is the command to create a security group for ec2 service. create_security_group is the command,  --description, --group-name are the sub commands. "This security group is created by me" is the description given to the security group. This will return the security group id created by aws in the JSON form. Adding permissions to the created security group The command authorize-security-group-ingress is used to add rules to the security group. --protocol takes the type of protocol, --port takes the port number, --cidr takes the IP addresses which can access the instance.  Launching an instance using the key pair and security ...