AWS give access to only elastic beanstalk instances & s3
How to give access to a IAM user to only access resources created by Elastic bean, i.e. The S3 bucket and the EC2 instances. The user should not be able to access any other S3 bucket or EC2 instance not created with Elastic Beanstalk. The same policy should apply to EC2 instances created automatically via the Auto Scaling policy.