AWS Elastic Beanstalk doesn't find .platform/hooks/postdeploy directory

Viewed 25

I am deploying a spring boot war to a single instance AWS Elastic Beanstalk environment and trying to run a postdeploy script.

I have successfully had .ebextension scripts executed and attempted to follow the same pattern for the .platform/hooks/postdeploy directory but unfortunately EB isn't able to find the directory.

I get the following in the eb-engine.log:

[INFO] Executing platform hooks in .platform/hooks/postdeploy/
[INFO] The dir .platform/hooks/postdeploy/ does not exist
[INFO] Finished running scripts in /var/app/current/.platform/hooks/postdeploy
[INFO] Executing cleanup logic 

I have verified the directory and script are placed inside the WAR file under /WEB-INF/classes:

Directory structure under .platform is .platform/hooks/postdeploy/myscript.sh

The EB environment is an Amazon Linux 2.

Any ideas why EB can't find the .platform/hooks/postdeploy directory? When I cd in /var/app I see a jar file and a Procfile.

0 Answers
Related