I'm building a Terraform module for Beanstalk and what happens is that you must create an EC2 Instance Profile and attach it to your environment.