I have successfully setup CodePipeline and CodeBuild to deploy my SAM applications. But now I want to convert this to CloudFormation. How do I do this? I followed the steps here http://docs.aws.amazon.com/lambda/latest/dg/automating-deployment.html
I am stuck at the CodeBuild part of the CloudFormation template ...
If you're looking for an example of how to set up CodePipeline and CodeBuild using Cloudformation, I'd recommend checking out this example template from one of my colleagues, which does all of this.
In the example, you can see how a code build project is set up using AWS::CodeBuild::Project, and how it's refererenced in the CodePipeline Build step by using a referencing a common ProjectName parameter. Checkout the documentation for AWS::CodePipeline::Pipeline.
Hopefully that helps, but if you need further assistence, I'd try clarifying what you've done so far, and what specifically you're getting stuck on.