After logging into AWS, select your preferred Region, Then select EC2 service.
Next, click on Instances and then select your Instance and click on Connect.
After Selecting connect. You will see a page similar to below image. Windows Users: Please convert .pem key to ppk via puttykeygen software. You can follow this by step-1 to access your instance. UNIX/LINUX/MAC Users: Go to the location of .pem key and follow the step-3 from the image given below in your terminal to give permissions to the pem file.
Next, you can execute the command in your terminal for accessing the server which can be found in the Example section of the image given below.
(Remember this command is run only .pem key location and use 'ubuntu' or 'ec2-user' instead of root).
The below image shows you how we can execute the command.
(Note: Your user might be ubuntu or ec2-user instead of root).
IAM User Access key
Click on Services to the AWS Management Console and open the IAM console
In the navigation panel, choose Users. If necessary, add the Access key ID column to the users table by completing the following steps:
A) Above the table on the far right, choose the settings icon.
B) In Manage Columns, select Access key ID.
C) Choose Close to return to the list of users.
The Access key ID column includes the access key IDs. You can use this information to view and copy the access keys for users with one or two access keys. The column also shows whether the access key is (Active) or (Inactive). The column displays None for users with no access key.
IAM Role Permission
Click on Services to the AWS Management Console and open the IAM console.
After clicking on IAM service, Go to the Dashboard & click on Roles. Then we have to click on Create new role.
After that, we choose the role type, Select Amazon EC2 and then select Next Step.
In the policy list we have to select AmazonEC2FullAccess & click on Next Step.
Enter a new Role Name and click on Create Role. Then Follow the step-1 from our page to connect to EC2 Instance.
In EC2 service click on your Instance, then press Action and select Instance Setting. Now, press Attach/Replace IAM Role.
In the drop down of IAM role, Select your IAM role which is created by you. We will select EC2Admin, which was created by us. Select Apply button.
You can install aws-cli just by typing sudo apt-get install awscli -y.
For Snapshot Management we have created the script which lets you set the retention period for the snapshots, this script will create a cron for automatic backup at 2:00 AM UTC. By default, we are not running this script, you can enable it by logging into the terminal or shell with the Instance login method and then type the below command. sudo bash /var/www/html/iscripts/rp.sh. Then select the retention period days as per your requirement.
Execute this command in terminal, then edit the retention period by typing sudo crontab -e.
You can set backup time as per your requirment.
Looking Forward to Have More Insights into Our Expertise?