Can't register on-prem Amazon Linux 2 with Systems Manager

0

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.
gefragt vor 2 Jahren938 Aufrufe
2 Antworten
0

Hello Jeff, I had a look at your case,

This section of the provided error provided a good clue as the -id parameter requires 36 characters, "- minimum field size of 36, RegisterManagedInstanceInput.ActivationId."

Please update command to register:

$amazon-ssm-agent -register -code xxxxxxxxxxxxxxxxxxxx -id xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -region "us-east-1"

Activation Code - 20 characters

Activation ID - 36 characters

profile pictureAWS
SUPPORT-TECHNIKER
Lundi
beantwortet vor 2 Jahren
0

I was stupid! I have swapped the code with the ID and didn't realize my mistake until AWS support caught it (because I put the literal code and ID in the support case). Problem solved!

beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen