'Deployment options using Amazon Lightsail? [closed]

We're looking to host a number of small projects on Amazon Lightsail. For larger projects we use Codepipeline to manage deployments from github.

Is there a similar option available to push deployments from github to a lightsail instance for deployments. I've had a look around and pipeline does not seem to work.

Is it possible to use AWS CodePipeline with Lightsail?

Are there any good deployment options for lightsail or should we look at something more basic such as

https://github.com/markomarkovic/simple-php-git-deploy

Many thanks for the advice!



Solution 1:[1]

I recently had the same challenge and got it working.

It is possible to use CodePipeline for fetching the source code and building the application with CodeBuild. The deployment of the application can be done with CodeDeploy.

For CodeDeploy, it is necessary to register the Lightsail Instance as an on-premise instance. On the instance itself the CodeDeploy agent needs to be installed and configured.

I have written a post about how to set this up on my blog.

Solution 2:[2]

This documentation page by Mike Coleman takes us on Using AWS CodeDeploy and AWS CodePipeline to Deploy Applications to Amazon Lightsail. It’s basically a guide of the process of setting up a deployment pipeline and what you're looking for.

After ensuring you have specific prerequesites in place (AWS account, GitHub account, git installed locally and AWS CLI installed and configured locally) you'll then go through the following 10 steps

  1. Create a service role.
  2. Create an S3 bucket.
  3. Create an IAM policy.
  4. Create an IAM user.
  5. Create a Lightsail instance and install the CodeDeploy agent.
  6. Verify the CodeDeploy agent.
  7. Setup the application in CodeDeploy.
  8. Fork the GitHub Repo.
  9. Setup CodePipeline.
  10. Test and Update the Application.

If that comes in handy, I've written a blog post on that and gone through a couple of Q&As along the way that aren't addressed in the documentation.

Solution 3:[3]

Old question, but maybe someone stumbles upon this and finds this useful - although might not be applicable if you need the pipeline to be inside AWS; but the solution that worked for me was

DeployHQ

It is quite easy to set up with using Github webhooks and deploy to Lightsail. There are couple of similar options out there, but DeployHQ was a winner for me for the clean dashboard and it fitted nicely to all the requitements (commands during build, webhooks, connects to multiple servers, free for low number of deployments per day).

Solution 4:[4]

You should be able to install the code pipeline agent and use it as a target just like you would use an on premise server.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2
Solution 3 ejke
Solution 4 user3776966