I think what you're asking is how to restrict visibility of EC2 instances in a specific account where there are multiple users in that account. The short answer is that you can't do that - you can restrict (using tag policies) what actions different users (i.e. callers to the EC2 API with different identities) can perform on EC2 instances; but you can't restrict the visibility of those instances in a "List" operation - either via the API or in the console.
Not really answering the question but for more information about tag-based access control: https://repost.aws/knowledge-center/restrict-ec2-iam
Why we can't hide the particular instance for that particular user???
You can leverage AWS Organizations and give each group their own AWS account.
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 months ago