You are mixing two types of authentication.
AWS IAM Users are granted permissions to make API calls to AWS services, such as launching an Amazon EC2 instance, uploading files to Amazon S3 and sending message to an Amazon SQS queue.
However, when logging into an Amazon EC2 instance running Linux, then the operating system on the instance is responsible for security, typically using SSH Keypairs associated with users. This type of security is completely separate from IAM Users. You cannot assign permissions on an instance to IAM Users.
Instead, you will need to:
- Create separate Linux users on the EC2 instance
- Use your standard corporate security to authenticate to the instance (eg Active Directory or LDAP). If you do not have a central directory authentication service, then you will need to generate keypairs for each user putting their public keypair in the user's
.ssh/authorized_keys
file inside their home directory.
- Use standard Linux techniques to assign folder/file access to users on the instance (eg
chown
)
- Users can then ssh/scp to the instance, providing their username and private keypair. They will have access to the files based upon permissions that were granted.
Bottom line: It's standard Linux. Assign permissions as you would for on-premises computers.