okay guys kindly ignore… i placed the public key into the /ubuntu/.ssh/authorised keys insted of /root/.ssh/authorised key.
this was the question or part of whole
An EC2 instance named devops-ec2 exists. Connect to this instance from the AWS console. Create an SSH key (/root/.ssh/id_rsa) on the aws-client host if it doesn’t already exist. Add the public key to the authorized keys of the root user on the EC2 instance for password-less SSH access.