Search code examples
javaamazon-web-servicesamazon-elastic-beanstalkaws-cloudformation

Using CloudFormation to create Elastic Beanstalk "Hello, world." Java env/app


As far as I understand, when creating a Elastic Beanstalk environment, CloudFormation templates are created automatically to manage the env's resources. However---to avoid any confusion---this is not what I mean/want to do. I want to create the Elastic Beanstalk env/app itself using CloudFormation. There seems to be no example of this to be found. What would a CloudFormation template look like that creates the simplest possible, "Hello, world."-style Elastic Beanstalk env/app, as well as the accompanying Java code?

I'd be happy about any advice that guides me in the right direction.


Solution

  • There are four different CloudFormation resource types available for Elastic BeanStalk.

    1. To create an Elastic BeanStalk application

    2. Creates an application version, an iteration of deployable code, for an Elastic Beanstalk application

    3. Creates a configuration template for an Elastic Beanstalk application

    4. Creates or updates an AWS Elastic Beanstalk environment

    Note:-

    The above links doesn't directly provide samples to create "Hello world" EB application. However, I think you can use this information and create the application.