Using codebuild variables in packer properties.json

We are building multiple AMI’s daily using Codebuild and packer. I’d like to use environment variables defined in our Codebuild job in our packer propertes.json config file, but I’m not sure how to make that work. Was hoping someone might be able to give me some help with the syntax.

Appreciate the help in advance!

Hi, thanks for reaching out. If I understand your request properly, I think you want to use the “env” template function. Full details can be found here