CloudFormation – Put credentials from S3 in EC2 Instance An example of CloudFormation for transfer to the inside of EC2 instance "ACCESS_KEY" and "SECRET_KEY" directly from the IAM to access the S3 Bucket using AWS-Cli.