AWS IAM controls who can access what resources in AWS infrastructure. AWS STS relies on AWS IAM and helps secure access to AWS resources by exchanging temporary credentials for a user or role. It provides short-term limited privilege credentials so that users don't have to store long-term authentication tokens.