Instance deployment workflow for ECS running on Amazon Linux 2 and later
The previous section describes the supported extensibility features throughout the phases of the application deployment workflow. There are some differences for the Docker platform branches ECS running on Amazon Linux 2 and later. This section explains how those concepts apply to this specific platform branch.
With many ways to extend your environment's platform, it's useful to know what happens whenever Elastic Beanstalk provisions an instance or runs a deployment to an instance. The following diagram shows this entire deployment workflow for an environment based on the ECS running on Amazon Linux 2 and ECS running on Amazon Linux 2023 platform branches. It depicts the different phases in a deployment and the steps that Elastic Beanstalk takes in each phase.
Unlike the workflow described in the prior section, the deployment Configuration phase doesn't support the following extensibility features:
      Buildfile commands, Procfile commands, reverse proxy configuration. 
Notes
- 
          
The diagram doesn't represent the complete set of steps that Elastic Beanstalk takes on environment instances during deployment. We provide this diagram for illustration, to provide you with the order and context for the execution of your customizations.
 - 
          
For simplicity, the diagram mentions only the
.platform/hooks/*hook subdirectories (for application deployments), and not the.platform/confighooks/*hook subdirectories (for configuration deployments). Hooks in the latter subdirectories run during exactly the same steps as hooks in corresponding subdirectories shown in the diagram. 
       
       
    The following list details the deployment workflow steps.
- 
        
        
Runs any executable files found in the
appdeploy/predirectory underEBhooksDir. - 
        
        
Runs any executable files found in the
.platform/hooks/prebuilddirectory of your source bundle (.platform/confighooks/prebuildfor a configuration deployment). - 
        
        
Runs any executable files found in the
.platform/hooks/predeploydirectory of your source bundle (.platform/confighooks/predeployfor a configuration deployment). - 
        
        
Runs any executable files found in the
appdeploy/enactdirectory underEBhooksDir. - 
        
        
Runs any executable files found in the
appdeploy/postdirectory underEBhooksDir. - 
        
        
Runs any executable files found in the
.platform/hooks/postdeploydirectory of your source bundle (.platform/confighooks/postdeployfor a configuration deployment). 
The reference to EBhooksDir represents the path of the platform hooks directory. To retrieve directory path name use the get-config script tool on the command line of your environment instance as shown: 
$/opt/elasticbeanstalk/bin/get-config platformconfig -k EBhooksDir