Answer – A
The AWS Documentation mentions the following.
When you create an AWS Elastic Beanstalk environment, you can specify an Amazon Machine Image (AMI) to use instead of the standard Elastic Beanstalk AMI included in your platform configuration`s solution stack. A custom AMI can improve provisioning times when instances are launched in your environment if you need to install a lot of software that isn`t included in the standard AMIs.
Using configuration files is great for configuring and customizing your environment quickly and consistently. Applying configurations, however, can start to take a long time during environment creation and updates. If you do a lot of server configuration in configuration files, you can reduce this time by making a custom AMI that already has the software and configuration that you need.
Options B and C are invalid since these options would not result in the least amount of time for setting up the environment.
Option D is invalid since the metadata data section is used for getting information about the underlying instances.
For more information on working with custom environments, please refer to the below URL-
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.customenv.html