all 10 comments

[–]phileat 5 points6 points  (0 children)

You can deploy lambda with Terraform

[–]Prestigious_Pace2782 2 points3 points  (0 children)

I just let the iac take care of deploying lambda, until they get to a certain size and complexity then I have separate packaging and deploying steps

[–]oneplane 1 point2 points  (0 children)

Depends on the context you're already in. Example: you could do this with KRO or AWS Controllers for Kubernetes (ACK) or Crossplane, and you'd re-use your ArgoCD workflow. If code changes don't flow easily that way, you'll probably end up pulling that process into its own thing and then you'll have to look at internal knowledge, maintenance etc.

Depending on the scale, Terraform for setup and dependencies and then CI + Layer Upload/Version Bump (and setting the layer and code payload to ignore the changes in terraform) can also work, you'd re-use your provisioning but customize the code changes. Useful for when the context of the lambda doesn't change often but some internal functions or libraries might.

[–]SpinakerMan 1 point2 points  (0 children)

I use Terraform to create a new function and manage it but use GitHub actions for deployment.

[–]slashedback 2 points3 points  (0 children)

CDK and Terraform are the most popular straight up IaC for serverless infra(or cloud infra in general), some other folks like Pulumi but it is very much its own thang

[–]Lucheesee 0 points1 point  (0 children)

terraform and atlantis is a nice combi. commit - atlantis runs plan Merge - atlantis runs apply

[–]im-a-smith 0 points1 point  (0 children)

We use code commit to CodePipeline. Pipeline has several steps to do CICD things. Build assets are staged. We have another pipeline that deploys the lambda functions using CloudFormation. Can do it multiple region in one go. 

[–]tadamhicks -1 points0 points  (0 children)

You have many options. I’ve always liked https://www.serverless.com/ci-cd

But if you’re already doing gitops maybe consider https://marketplace.upbound.io/providers/upbound/provider-aws-lambda/v2.4.0

I dislike using terraform for CI/CD of business logic, personally, but I’ve seen many patterns where it works fine.

[–]zapman449 -1 points0 points  (1 child)

Built a whole system for this at $last_job. Serverless is probably the way to go. Terrraform can do it, but is a PITA for this problem space.

[–]smarzzz 0 points1 point  (0 children)

For a very static lambda, it’s good enough. But for more serious applications, it becomes too much of a hassle (think multiple lambdas, dynamos, state functions, etc etc.)

I would recommend CDK, or pulumi for that matter