I want to access S3 object in my nodejs Program deployed in a EC2 instance, the accessKeyId & secretAccessKey are being stored in ~/.basrc file. It is working fine.

But I want to know the best and scure way to store those infomation in AWS environment.

Can any one guide me?