Commit version in Application

How do I put a git commit hash from git describe --always some how in my serverless application?

My goal is to correlate what’s deployed with my code in git.

I’ve noticed other serverless framworks typically use environment variables, though only on a function level to capture the commit hash.

What am I missing? Thank you!

I ended up with COMMIT: ${env:CODEBUILD_RESOLVED_SOURCE_VERSION} in my serverless.yml.

Forgot to mention I am using Output artifact format: CodePIpeline default on AWS.

Hi I am hoping you may know of another way as I dont know of “CodePIpeline default on AWS” for me.