I'm trying to execute this command on an on-premises Amazon Linux 2 instance:
amazon-ssm-agent -register -code "<removed_code>" -id "<removed_id>" -region "us-east-1"
It fails with :
Error occurred fetching the seelog config file path: open /etc/amazon/ssm/seelog.xml: no such file or directory
Initializing new seelog logger
New Seelog Logger Creation Complete
2022-03-22 23:22:51 ERROR Registration failed due to error registering the instance with AWS SSM. InvalidParameter: 1 validation error(s) found.
- minimum field size of 36, RegisterManagedInstanceInput.ActivationId.
/var/log/amazon/ssm/errors.log contains:
2022-03-22 23:24:07 ERROR [newAgentIdentityInner @ identity_selector.go.96] Agent failed to assume any identity
2022-03-22 23:24:07 ERROR [NewAgentIdentity @ identity_selector.go.109] failed to find identity, retrying: failed to find agent identity
2022-03-22 23:24:13 ERROR [newAgentIdentityInner @ identity_selector.go.96] Agent failed to assume any identity
2022-03-22 23:24:13 ERROR [NewAgentIdentity @ identity_selector.go.109] failed to find identity, retrying: failed to find agent identity
2022-03-22 23:24:19 ERROR [newAgentIdentityInner @ identity_selector.go.96] Agent failed to assume any identity
2022-03-22 23:24:19 ERROR [Init @ bootstrap.go.75] failed to get identity: failed to find agent identity
2022-03-22 23:24:19 ERROR [run @ agent.go.130] error occurred when starting amazon-ssm-agent: failed to get identity: failed to find agent identity
2022-03-22 23:25:04 ERROR [processRegistration @ agent_parser.go.177] Registration failed due to error registering the instance with AWS SSM. InvalidParameter: 1 validation error(s) found.
- minimum field size of 36, RegisterManagedInstanceInput.ActivationId.