
Serverless CI/CD on the AWS Cloud - lucyinkedup
https://caylent.com/serverless-ci-cd-on-the-aws-cloud
======
ak217
Personally I would not use CodeCommit, CodeDeploy, or Lambda for my CI/CD. I'm
very much a fan of Lambda, but it just isn't the right platform for a lot of
CI/CD.

GitHub Actions with self-hosted runners
([https://help.github.com/en/actions/hosting-your-own-
runners/...](https://help.github.com/en/actions/hosting-your-own-
runners/about-self-hosted-runners)) offers a much more user-friendly and
complete product. It's a shame that GitHub does not publish an AMI, but
installing the runner is straightforward enough. A T3 instance is all that you
need.

~~~
ashtonkem
In theory I like Github actions, in practice it was a nightmare when I tried
it.

Discoverability and modification was a nightmare. Solving any task basically
required that I pick a community written extension and trust it with github
credentials.

Their documentation also managed to both be too long and devoid of the details
I needed answering, which is a neat trick.

In the end I went back to CircleCI, since writing a yaml file was much
clearer.

~~~
stevekemp
You can always fork an action-repository to your own account, and failing that
pin to a specific version.

Github actions I find pretty awesome, allowing your configuration file to just
be glue between well-written, well-maintained actions for doing "stuff".

I've written a couple of my own, and since they're docker based they're very
simple to get running, and very easily composable.

For example this one is trivial, but it lets you run project-specific test-
cases on PR/push/whatever:

[https://github.com/skx/github-action-tester](https://github.com/skx/github-
action-tester)

Just add `.github/run-tests.sh` to your repository and enable the action,
suddenly your test-cases run. And since the test-cases are in your repository
you can do anything you like, including run them locally!

~~~
ashtonkem
I don’t want to have to fork and maintain a repo to run tests or push to a
docker repository. Things that take a single line of bash should not require
an entire repository to implement.

------
thinkingkong
As a community Im surprised there arent more open source configurations to do
this type of thing. We should probably be assembling distibutions containing
best practices or at least highly opinionated tools with well documented trade
offs.

The entire “heres a parts bin go bananas” thing cant be the final state of
devops. Simultaneously building profitable businesses on top of the three is a
terrifying prospect.

~~~
tmpz22
Isn’t that what a PaaS is? Lambda, beanstalk, app engine, heroic, etc?

~~~
thinkingkong
Sort of. But those are hosted highly opinionated systems. The option /
flexibility of self hosting a system like that using open source wiring is
whats missing.

~~~
tmpz22
So Amazon ECS? Bring the docker container but put it behind a cloud
loadbalancer? Or App Engine Custom environment. (not tried to be confrontation
just generally feel like a lot of these problem sets have been experimented
against and provided for).

~~~
thinkingkong
Ah I meant more the glue. Like open source cloudformation configs. Or
terraform configs. The building blocks are all there to be sure.

------
garethmcc
If you are using the Serverless Framework to build your serverless
application, we actually provide a full CI/CD solution as a part of the
Serverless Framework Pro Dashboard that is free to use. You can easily sign up
at dashboard.serverless.com and it includes a lot more than just CI/CD;
monitoring, debugging, local development via the cloud and a ton more!!

------
Game_Ender
We have had awesome success with Buildkite [0] and self hosted build agents on
EC2. We use the provided autoscale lambda and it’s pretty hands off system
[1]. You also get the upside of controlling how much local caching you want to
do.

0 - [http://www.buildkite.com](http://www.buildkite.com)

1 - [https://buildkite.com/docs/tutorials/elastic-ci-stack-
aws](https://buildkite.com/docs/tutorials/elastic-ci-stack-aws)

~~~
Axsuul
Wow thanks for recommending this! I'm currently using Google Cloud Build and
it's been great to get a CI/CD system up and running quick. But it does add
about an extra 4-5 minutes of startup time due to limited caching ability.
Buildkite looks like a great next step up while still being able to utilize
GCP.

Interested to hear any feedback from those running Buildkite with GCP.

------
dear_srik
Seems marketing gig, how's it different than using Gitlab?

~~~
TheHypnotist
Probably. Amazon is equally guilty disguising "training" as a foot in the door
for helping you solve ($$) your code pipeline issues. I'm not surprised if
partner vendors do the same.

------
crabasa
Highly recommend that anyone looking for an OSS tool to build serverless apps
on AWS check out Architect [1].

The folks behind Architect built a fully hosted service that includes CI/CD
called Begin [2].

I’m happily using both for a few different projects.

[1] [http://arc.codes](http://arc.codes)

[2] [http://begin.com](http://begin.com)

