Can't connect to Windows EC2 instance built by Packer via SSM Agent
You need to, at least, run the Quick Setup for SSM, and you need to add the AmazonSSMManagedInstanceCore policy to the EC2 instance's role (or just use the AmazonSSMRoleForInstancesQuickSetup role if you don't need any other set of policies)
Be advised, it takes a bit of time for the Quick Setup to finish, and I've found that if you didn't set the role when launching the instance sometimes you may need to do an SSH session to it before SSM will "kick in" (I don't know why this is). While you're at it, check the SSM Agent is actually running.
https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-quick-setup.html