Use PGP (Pretty Good Privacy) encryption standard to encrypt and securely transmit messages, credentials, and other sensitive information.
Using instance profiles is a better option for authenticating access to AWS resources. An instance profile is a unique IAM role associated with an EC2 instance at launch. This role allows the instance to access specific AWS resources and services