I've created IAM Instance profile following this guide: http://docs.aws.amazon.com/codedeploy/latest/userguide/getting-started-create-iam-instance-profile.html
Then I'm trying to create CodeDeploy application and set this IAM instance profile, but it fails with message:
Cannot assume role provided.
Ideas?