First of all, we want to create sample PHP Application and push this application to Github. If you want you can use following sample repository.
After that go to AWS Management Console and Search Elastic Beanstalk and Create PHP Application.
Give the Application name and Add Application tags. After that select platform as PHP and platform version. Finally, the Application Code selects as a Sample Application.
After that, you can see Elastic Beanstalk environment status is OK.
Go to URL and view the sample application.
Go to AWS management console and search CodePipeline and create pipeline.
Adding details for following fields and click Next.
Next to adding the source stage as Github and connect to Github. After that select your repository and Branch.
Next, go to the deploy stage and select Elastic Beanstalk as a deploy provider, and select Application Name and Environment Name.
After that, you can see the source and deploy succeeded.
Go to Elastic Beanstalk and click URL. After that, you can see your application deployed.
Change code as V1 and push to Github. After that, you can see your code pipeline triggers the changes.
After that refresh, the previous URL and you can see the latest changes appear here.
Thanks for reading the Article.