Go to the AWS Console, from Services choose Elastic Beanstalk and click Create Application.
Update Application information and Platform settings to match the values below:
|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.
Choose Upload your code and update the parameters as below:
|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 wordpress-beanstalk.zip.|
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
Scroll down the screen and click Edit under Network.
Choose TargetVPC from the drop down menu.
Click Public IP address
Choose TargetVPC-public-a in us-west-2a availability zone.
In this section, you will configure your software to connect to the RDS database created in the Database Migration section.
Click Edit under Software.
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.
|RDS_HOSTNAME||Your RDS Endpoint. Can be found in RDS Services -> Databases -> Connectivity & Security tab -> Endpoint field|
|RDS_PASSWORD||Your RDS database Password|
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.
Once your environment is ready, you should see its heatlh status OK
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.
In AWS Console go to Services and choose RDS
Click Databases from the left menu and choose the DB you created earlier.
Under the Connectivity & Security tab, click the name of security group under VPC security groups
Click Security group ID
Click Edit Inbound rules
|Source||Choose the Security Group that Elastic Beanstalk created during the application creation process.|
|Description||Allow MySQL traffic from the Elastic Beanstalk app instance|
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.