In my current project, we are using serverless framework to package/deploy our serverless application on AWS.
Deployment pipeline automates the terraform & serverless framework commands ,provision AWS infra resources and package/deploy application to AWS.

Infrastructure as Code (IaC) principle was key factor in designing this pipeline.

Below is the flow diagram of the implementation:

CI-CD-PIPELINE

Details:

Hope this helps.