Run Elastic Beanstalk with no platform

amazon-web-serviceselastic-beanstalk

I want to run Elastic Beanstalk just using nginx to serve up files from a EFS (maybe this is overkill?).

I tried setting up without specifying default_platform: in config.yml, however that just makes it default to Java 8.

eb create then fails with

ERROR: Unable to launch application as the source bundle does not contain either a file named application.jar or a Procfile.
ERROR: [Instance: i-34a55904] Command failed on instance. Return code: 1 Output: (TRUNCATED)...config/logging.yml  
Unable to launch application as the source bundle does not contain either a file named application.jar or a Procfile.
Unable to launch application as the source bundle does not contain either a file named application.jar or a Procfile. 
Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/01_configure_application.sh failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.
INFO: Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
WARN: Environment health has transitioned from Pending to Degraded. Command failed on all instances. Initialization completed 16 seconds ago and took 3 minutes.
ERROR: Create environment operation is complete, but with errors. For more information, see troubleshooting documentation.
WARN: Environment health has transitioned from Degraded to Severe. Command failed on all instances. ELB health is failing or not available for all instances.

ERROR: The operation timed out. The state of the environment is unknown. The timeout can be set using the --timeout option.

Since there is no java application available.

Is there a way to set up an elastic beanstalk environment with only nginx running and no platform behind it?

Best Answer

If you are just serving up static files, then this is a overkill. You should use S3 to serve up static files. No Beanstalk or EC2 instances required for that. See this link for more info.

As much as I like AWS solutions, you can also do this with Github pages for free.

If these pages are not static, then you'll need to define a platform.