The assume role doesn't have sufficient permission to invoke the RunInstances API on EC2 instances.
To resolve this problem, attach an IAM policy to the assume role that has permission to invoke the RunInstances API.
To fix >> https://ibmimedia.com/blog/115/solving-systems-manager-automation-errors-in-amazon-ec2-or-aws-systems-manager-console
aws ssm automation document examples
aws systems manager documentation
aws ssm automation actions
aws automation scripts
ssm agent on instances are not functioning
aws automation service troubleshooting guide
aws:executeautomation
aws:runcommand