If you’ve changed keys, you will need to delete a ssh key from /etc/known_hosts file.
You can edit it manually using an editor such as vi or vim.
Or you can use ssh-keygen command with -R option to delete the hostname or IP address.
ssh-keygen -f "~/.ssh/known_hosts" -R "xxx.xxx.xxx.xxx"
Here’s how to copy files from one directory to another.
rsync -arvz /dir1 /dir2 >> /tmp/rsync.log &
Format: rsynch –options source destination
- -a archive mode
- -v verbose
- -p keep permissions
- -z zipped during transfer
- -r recursive
Here’s a IAM policy that you can add to an IAM user or an IAM role so they are able to start and stop a specific RDS instance.
If you have changed instance type to either C5 or M5 and it no longer boots, it’s due to the following reasons.
- The Elastic Network Adapter (ENA) enaSupport attribute is disabled for the instance.
- The ENA module isn’t installed on the instance
- The NVMe module isn’t installed on the instance, or, if installed, the NVMe module isn’t loaded in the initramfs image of the instance.
- You are trying to mount the file systems at boot time in the “/etc/fstab” file using a device name. Amazon Elastic Block Store (Amazon EBS) volumes are exposed as NVMe devices to these instance types, and the device names are changed. To avoid this, mount the file systems using UUID/Label. For more information, see Amazon EBS and NVMe.
You will need to run a Bash script to update the current instance to be able to support a C5 or M5 instance.
Here’s how to get a user info from AWS CLI.
aws iam get-user --user-name John.Doe --profile default