CI/CD pipeline for Serverless - simplest option

0

I am trying to develop a serverless app that uses cognito user pools, API gateway, Lambdas and dynamo DB. I can do everything in console but that isn't great as I would like to have source control and a way to recreate the entire setup in an identical way (for different environments like dev, staging, production etc.). So I need some kind of a CI/CD pipeline with source control for both lambda code as well as the infrastructure as code. I know there are so many options involved. code commit, code pipeline, code deploy, could formation, SAM, CDK etc. but I haven't learned any of these yet and I don't know where to start. I am a developer and I would like to get on with writing application code without having to learn so many dev ops tools and technologies. I just want something that that abstracts away all the details of the CI/CD pipeline and let me focus and building the product itself. I guess CodeStar was build to do just this. Looks like it got replaced by code catalyst which seem to promise to hide away all the complexity of building CI/CD pipeline. Is this the best option with the minimum learning curve for someone like me? Or are the other options I should look at? To summarise what I am looking for is the simplest and most developer friendly way to maintain a CI/CD pipeline with a shortest learning time. I am happy to sacrifice the ability to customise things and I am happy to go with some default configuration that works. I am not bothered about using any specific tool or technology. For example I am not saying I need Jenkins for builds or I need to use GitHub instead of Code commit. I would like to go with whatever that gives me the smoothest experience and least complexity,

Sam
asked 3 months ago266 views
2 Answers
2

Hi Sam! I'd recommend starting with SAM to build the app locally first. Once you get a hang of SAM dev cycle, you can explore the CICD pipelines.

Take a look at this blog post [1] and these docs. [2]

[1] https://aws.amazon.com/blogs/compute/introducing-aws-sam-pipelines-automatically-generate-deployment-pipelines-for-serverless-applications/ [2] https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-generating-example-ci-cd.html

profile pictureAWS
answered 3 months ago
  • Thank you lunchobot, SAM does look interesting but I would like to understand why it is a better choice than using one of the alternatives, say, CDK? Because CDK lets you define your resources using a programming language of your choice. Which sounds more appealing to me as a developer. And then the promise of Code Catalyst is it lets you work at a higher level of abstractions and use 'blueprints' to generate entire pipelines without any manual configurations. Using SAM to build the app locally involves creating some sort of local versions of dynamoDB etc? Is it really worth all the trouble?

  • Hi @sam SAM and CDK are different things and you can use both. CDK helps on the infrastructure as code, SAM helps to deploy, test and debug it. By default SAM use cloudformation, but it's possible to use also CDK. https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-cdk-getting-started.html

1

Hi Sam

The main benefit of SAM for me is the ability to locally spin up an api gateway, invoke a lambda function and mock test locally with synthetic events. CDK, Terraform and others are also great options. All of these will work fine with different CICD tooling.

profile pictureAWS
answered 3 months ago
  • Thanks again luchobot, The ability to test things locally is indeed interesting. But the priority for me is finding something with the shortest learning time and which gives me the highest level of abstraction that shields me as much as possible from things related to Dev Ops. Do you know how using SAM as described in the link you sent compares to using code catalyst blue prints?

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions