With AWS Elastic Beanstalk ebextensions we can create files, install packages, and run commands on the Amazon EC2 instances.
Here, at Bobcares, we assist our customers with several AWS queries as part of our AWS Support Services.
Today let us see how we can customize the same.
AWS Elastic Beanstalk ebextensions
The configuration changes we make to the Elastic Beanstalk environment won’t persist if we use the following configuration methods:
- Configure an Elastic Beanstalk resource directly from the console of a specific AWS service.
- Install a package, create a file, or run a command directly from the Amazon EC2 instance.
In order to avoid errors while we run the AWS CLI commands, we make sure to use the most recent version.
Moving ahead, let us see how our Support Techs perform the configuration.
-
Set up the .ebextensions directory
1. Initially in the root of the application bundle, we create a hidden directory, .ebextensions.
2. Then we store the configuration file in the .ebextensions directory.
Usually, the application source bundle looks like the following:
~/workspace/my-application/ |-- .ebextensions | |-- 01-server-configuration.config | `-- 02-asg-healthcheck.config |-- index.php `-- styles.css
-
Customize the Elastic Beanstalk environment
1. To do so, we use the option_settings key to modify the environment configuration.
We can select from general options for all environments and platform-specific options.
2. The option_settings modifications will not apply to the environment configuration if there are Precedence rules.
We can remove the configurations we apply during environment creation. Or we can make the update on the Elastic Beanstalk API.,
To do so, we use the update-environment command with the –options-to-remove flag.
3. In case there is no option for the desired resource configuration, we use the Resources key to customize the resources.
4. Most often, we use keys to customize the software on Linux or Windows servers.
-
Apply the custom settings to the application
1. First, we create an application source bundle that includes the configuration files.
However, we need to make note that folders starting with a period, such as .ebextensions, can be hidden by file browsers.
To keep them visible, we include the .ebextensions folder in the root of the application bundle when we create the application source bundle.
2. Eventually we deploy the updated Elastic Beanstalk application.
[Need further assistance? We are here for you]
Conclusion
In short, we saw how our Support Techs configure the AWS ebextensions for our customers.
PREVENT YOUR SERVER FROM CRASHING!
Never again lose customers to poor server speed! Let us help you.
Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.
0 Comments