As far as I remember you have to have a github repo account for auto pushing changes to ec2.
Here is the link https://aws.amazon.com/blogs/devops/automatically-deploy-from-github-using-aws-codedeploy/
looking at it though you might still need something to trigger composer update etc either that or do that manually, you could probably setup a webhook to trigger an update script that can only be run after a github deploy?