Download and Install Packer as per instructions - https://developer.hashicorp.com/packer/downloads?product_intent=packer
First need to initialize Packer to install the required plugins.
In current directory:
packer init .
Then build:
AWS_PROFILE=<<YOUR AWS PROFILE>> packer build amzn-linux-2023-graf-agent.pkr.hcl
Colin But.