This lesson will teach you how to use IAM roles to delegate permissions with EC2. It is often necessary for applications to access resources in the AWS environment. Using IAM roles that can be attached to an EC2 instance is a best practice for allowing applications on an EC2 instance to access other resources and services. This lesson provides a hands-on walkthrough of how to create an IAM role, attach the role to an EC2 instance, and access an S3 bucket using the role.
Update: AWS Systems Manager Parameter Store is a new, preferred way to store data such as passwords, database strings, license codes, and other sensitive information as parameter values. For details, see: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-paramstore.html