Amazon Inspector - Agent Status UNKNOWN

0

Followed the instructions here https://docs.aws.amazon.com/inspector/latest/userguide/inspector_applications.html

When I click the "Preview Target" button, only 6/34 of our instances say HEALTHY. The rest say UNKNOWN.

Will I have to install it on all of these manually?

swan
질문됨 2년 전1766회 조회
4개 답변
0

Are you using Inspector Classic or Inspector v2? If using Inspector v2 then as long as you have the SSM agent installed it will work.

profile pictureAWS
답변함 2년 전
  • Looks like I'm running classic. Apparently those are the instructions I found while searching. Before enabling Inspector we didn't have any agents of either type installed. Bummer the automated install didn't work on most of them.

0

Check the output of the IAM role check - even though it shows 'Succeeded' what that means is that the check succeeded, NOT that the settings are necessarily correct. I had the same issue and found that the EC2 Instance Role used by the EC2 instance was missing the AmazonSSMManagedInstanceCore permissions policy.

profile pictureAWS
답변함 2년 전
  • Thanks Alex. I replied in an answer because it does not look like you can format a commetn/reply.

0

Switched to version 2 and 29/35 instances aren't being scanned. I checked and the SSM agent is installed via Snap(Ubuntu 18.04).

Under Inspector > Settings > Account Management > Instances > Not Scanning > Reason it says Unmanaged Ec2 instance.

When I hover over the reason it says "This EC2 instance is not managed by SSM. Please follow these instructions to remediate the issue."

I click on the instructions and it brings me to AWS Systems Manager > Automation > Execute

Document name
AWSSupport-TroubleshootManagedInstance
Document version
$DEFAULT
Document description
AWSSupport-TroubleshootManagedInstance
This automation document checks if the instance meets the prerequisites for EC2 Instances to come up as SSM Managed Instances. This documents runs checks related to VPC configuration like security group rules, VPC endpoints, Network ACL configuration,Route table and if IAM role is attached or not. At the last, it shares information about SSM Agent troubleshooting kit which can be downloaded and run on the instances to check OS level issues in related to SSM agent. Supports both Windows and Linux.

I add one of the instance ids and execute this document. I get a success from all of the steps. Now what are my next steps since all of those passed?

Execution status
Overall status
Success
All executed steps
11
# Succeeded
11
# Failed
0
# Cancelled
0
# TimedOut
0
swan
답변함 2년 전
0

Thanks for the reply Alex, and good advice. Here is the output of the CheckInstanceIAM step:

OutputPayload
{"Payload":{"output":"5. Checking if Instance Profile is attached : 
 PASSED: Found Instance profile attached to the Instance: arn:aws:iam::(redacted):instance-profile/(redacted). AWS Managed policy,AmazonEC2RoleforSSM is attached to the Instance profile."}}

The role on this instance is called "AmazonEC2RoleforSSM", here is the service list:

CloudWatch
Limited: Write
All resources

CloudWatch Logs
Limited: List, Write
All resources

Directory Service
Limited: List, Write
All resources

EC2
Limited: List
All resources

EC2 Messages
Full access
All resources

S3
Limited: List, Read, Write
All resources

SSM Messages
Full access
All resources

Systems Manager
Limited: List, Read, Write
All resources

I clicked on "Attach Policies" to compare these permissions to the ones you specified (AmazonSSMManagedInstanceCore) It looks like all those permissions are already attached to the instances with the existing AmazonEC2RoleforSSM policy.

EC2 Messages
Full access
All resources

SSM Messages
Full access
All resources

Systems Manager
Limited: List, Read, Write
All resources
swan
답변함 2년 전

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

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

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

관련 콘텐츠