5
votes

If I apply a setting in two config files in the .ebextensions folder does the last file override the setting in the first file?

For example take two files with instance role setting defined:

.ebextensions/0001-base.config

option_settings:
  IamInstanceProfile: aws-ec2-role

.ebextensions/0010-app.config

option_settings:
  IamInstanceProfile: aws-app-role

Which role will the Beanstalk EC2 instance be given? aws-ec2-role or aws-app-role?

1

1 Answers

5
votes

.ebextensions are executed in alphabetical order so aws-app-role would be the final result for your IamInstanceProfile option setting.

Your syntax for the .ebextensions would cause a compilation error if you tried to deploy them, here is the correct way to do what you want.

option_settings:
      "aws:autoscaling:launchconfiguration":
          IamInstanceProfile: aws-app-role