I am creating a step function that orchestrates a lamda. The lamda has 4 simple endpoints.
I would like to save the lamda and step function in the same git repo. Regarding this:
It is best practice to have actual code and necessary infrastructure code in same repo.
Creating infrastructure as code:
There are many options, couple of widely used ones are:
In general writing CDK code is easier than cloudformation and writing step functions in CDK is a million times easier.
So, my recommendation is to write CDK code to create Lambda functions and step functions.
Build & Deploy:
We can use AWS CodeBuild to build artifacts and AWS CodePipeline to orchestrate.