Following tutorials like this one, I managed to set up a continuous deployment pipe to deploy automatically via AWS CodeDeploy to my EC2 instance using GitHub actions, triggered on merging (or rather pushing) to the main branch. In most of these tutorials, an AWS S3 bucket is specified explicitly, and an aws s3 sync
command is included in the GitHub Actions YAML file (again, like in the tutorial).
However, I realised that one need not specify (or even manually create) and S3 bucket for the deployment to work. Instead, just the following command example is enough for the workflow to deploy:
aws deploy create-deployment --application-name ${{ env.codedeployapp }} --deployment-group-name ${{ env.codedeploygrp }} --deployment-config-name CodeDeployDefault.OneAtATime --github-location repository=${{ github.repository }},commitId=${{ github.sha }}
Why do these tutorials manually create an S3 bucket when not required? I want to make sure that I'm not missing something obvious in my setup.