SAM (Serverless Application Model) is an alleviate version of CloudFormation and is one of the preferred methods to describe AWS infrastructures in a IaC (Infrastructure as Code) manner.
Read the article here.Deploying Java Serverless Functions as AWS Lambda
