AWS Elastic Beanstalk .ebextensions order of precedence
Asked Answered
S

1

7

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?

Stranglehold answered 15/8, 2016 at 2:28 Comment(0)
A
8

.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
Acclimatize answered 16/8, 2016 at 0:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.