Configure wordpress on ec2 instances using RDS service

In Aws many services are available, for computing power EC2 service is used . Using EC2 service instance is launched which have OS installed, which is installed using AMI(amazon machine image).
AMI(amazon machine image) is provided by AWS ,which is used to install OS .Many AMIs are available for EC2 instance .
For launch of EC2 instance at Aws , many resources are used
After select AMI for launching EC2 instance it is necessary to select the Aws instance type , in different instance type different amount of memory and cpu is available . For installation of OS, storage is necessary . Security group is also added to the instance for decide the traffic , Key pair is added to the instance for remote logging.
For launch the instance using above created security group and key pair run below cmd
aws ec2 run-instances --image-id ami-0be2609ba883822ec --instance-type t2.micro --count 1 --subnet-id subnet-b64fced0 --security-group-ids sg-d51499e1 --key-name N.verginea_key_pair --tag-specifications ResourceType="instance",Tags=[{key="Name",value="MyOS"}]

After launching instances create dababase in RDS service of AWS
RDS is used for data base management , in this service everything is managed in the backend . For create new database use below steps
In engine options choose the type of database , which have to be used

In credentials setting enter the admin name and set the password

In DB instance size choose the type of instance and in the storage section choose the storage type and allocate size , in this service when allocated service is full then automatically storage scaling is done

Security group is also defined for connecting to data base instance and choose subnet group

Mysql version can be choosen also

After done all this process install httpd , for installing use below cmd
yum install httpd -y

For install compatible version of wordpress version 5.6 , install php7.4
amazon-linux-extras install php7.4

After installing all the requirements install wordpress using below cmd
curl https://wordpress.org/latest.tar.gz --output wordpress.tar.gz
tar xf wordpress.tar.gz
cp -rf wordpress /var/www/html

Edit wp-config.php file with database name , database admin name , password and enter database instance endpoint .


After done all the process use url of server https://ip_of_ec2_instance/wordpress and done all the installation part.

