Packer: AWS EC2 private subnet

I’m trying to setup to create an AMI in VPC with private subnet only using SSM session manager and I’m not able to connect in that context, it’s working only if I have a public subnet in my VPC. Anybody has an idea how to make this work?

Thank you.

Have you looked into VPC Endpoints for SSM?