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.
질문됨 2년 전938회 조회
2개 답변
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
지원 엔지니어
Lundi
답변함 2년 전
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!

답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠