Launch environment

1. Create Elastic Beanstalk Environment

  1. Go to the AWS Console, from Services choose Elastic Beanstalk and click Create Application. create-s3-sourcecodebucket

  2. Update Application information and Platform settings to match the values below:

    Parameter Value
    Application Name my-eb-app
    Platform PHP
    Platform branch PHP 7.2 running on 64bit Amazon Linux 2
    Platform version Choose Recommended Option – e.g. : 3.1.2 (Recommended)

    PHP version running on your web-server is 7.2.24. You can verify it on your source machine with php –v command.


  3. Choose Upload your code and update the parameters as below:

    Parameter Value
    Upload your code Click
    Version label my-eb-app-source (will be populated automatically. Leave it as is)
    Public S3 URl Click
    S3 URL link S3 object link for your source-code bundle
  4. Click Configure more options.


Once you click Configure more options, you will see complete application related configurations. In this workshop, you will only update Network and Software settings. Leave all the remaining parameters as defaults

2. Configure Network Settings

  1. Scroll down the screen and click Edit under Network.


  2. Choose TargetVPC from the drop down menu.

  3. Click Public IP address

  4. Choose TargetVPC-public-a in us-west-2a availability zone.

  5. Click Save


3. Configure Software Settings

In this section, you will configure your software to connect to the RDS database created in the Database Migration section.

  1. Click Edit under Software. eb-settings-software

  2. Scroll down to the Environment properties section. Leave all other fields without changes. Update the environment properties section with details of the RDS database you have created earlier.

    Parameter Value
    RDS_DB_NAME wordpress-db
    RDS_HOSTNAME Your RDS Endpoint. Can be found in RDS Services -> Databases -> Connectivity & Security tab -> Endpoint field
    RDS_USERNAME admin
    RDS_PASSWORD Your RDS database Password
    RDS_PORT 3306
  3. Click Apply

  4. Click Create Application

    Elastic Beanstalk will now automatically start creating your environment and later deploy and run your application.

    Creating environment may take few minutes. Use them to review other configuration options of Elastic Beanstalk in AWS Console or checking Elastic Beanstalk documentation describing this topic.


  5. Once your environment is ready, you should see its heatlh status OK eb-app-health

3. Update RDS Security Groups

In order to provide connectivity between your application and RDS, you will need to update RDS Security Group to allow MySQL traffic from Elastic Beanstalk automatically created Security Group.

  1. In AWS Console go to Services and choose RDS

  2. Click Databases from the left menu and choose the DB you created earlier.

  3. Under the Connectivity & Security tab, click the name of security group under VPC security groups eb-rds-connectivity

  4. Click Security group ID eb-rds-sg

  5. Click Edit Inbound rules

    Parameter Value
    Type MYSQL/Aurora
    Source Choose the Security Group that Elastic Beanstalk created during the application creation process.
    Description Allow MySQL traffic from the Elastic Beanstalk app instance


  6. Click Save rules

Congratulations! You have launched your Elastic Beanstalk environment and deployed your application. Go to the next section to review and manage it.