Deploy to AWS EC2
Buddy turns deployments into a breeze, allowing you to update your EC2 servers on every push to branch. You can also deploy manually on click, or recurrently on time intervals.
Image loading...
Tip
If you are new to Buddy, check out our workflow guides that will tell you how to build, test and deploy your type of application.
Configure AWS
Warning
We recommend setting an Elastic IP in your EC2 instance. Without it, the Public IP may change whenever the EC2 is restarted.
- Log in to your AWS account and copy the Public IP of your EC2 instance:
Image loading...
Configure pipeline in Buddy
- Create a new project, select your Git provider and choose the repository with your project:
Image loading...
- Add a new pipeline and configure the details: name, trigger mode, and branch from which you want to deploy.
Image loading...
Configure AWS EC2 deployment
- EC2 uses the SFTP protocol for deployments. This means you can serve it with the SFTP Transfer action:
Image loading...
- The action has four configuration tabs:
- Transfer – here you define the source path, deployment flags, and files to ignore
- Target – here you provide the details of the server to which you want to deploy
- Conditions – here you configure the trigger conditions for which the action will run
- Options – here you define the action's name and behavior on failure and timeout
Warning
If you are using build actions in your pipeline, make sure to select the Filesystem as the source to deploy artifacts and processed files.
Image loading...
Hint
Buddy's deployment is based on changesets. This means only changed files are deployed, which makes it lightning fast ⚡️. The first deployment is always performed from scratch, unless you set a revision on the server in the Options tab.
- When ready, click Add this action to finish configuration.
Success
Congratulations – you have just automated your deployment to AWS EC2! 🥳
Last modified on Sep 24, 2024