- Newest
- Most votes
- Most comments
The UnauthorizedException you're encountering when trying to search using AWS Resource Explorer is likely due to insufficient permissions, specifically related to views in Resource Explorer.
Even though you have created an index and have AdministratorAccess and AWSResourceExplorerFullAccess policies, Resource Explorer requires specific permissions to perform search operations on a view.
To resolve this issue, you need to ensure that your IAM user or role has permissions to both get a view and perform a search operation. Specifically, you need the following permissions:
- resource-explorer-2:GetView
- resource-explorer-2:Search
These permissions should be granted on a view that resides in the region where you're making the search request (in your case, us-east-2).
If you haven't specified a view in your search request, Resource Explorer automatically uses the default view for the region. It's possible that you don't have the necessary permissions for this default view.
To fix this, you can either:
- Create a new view and grant yourself the necessary permissions for that view.
- Modify your existing IAM policy to include permissions for all views in the region.
You can add a statement like this to your IAM policy:
{ "Effect": "Allow", "Action": [ "resource-explorer-2:GetView", "resource-explorer-2:Search" ], "Resource": "arn:aws:resource-explorer-2:us-east-2:123456123456:view/*" }
This will grant you permissions to get and search all views in the us-east-2 region.
After adding these permissions, you should be able to perform the search operation without encountering the UnauthorizedException.
Sources
Troubleshooting Resource Explorer search issues - AWS Resource Explorer
Troubleshooting AWS Resource Explorer permissions - AWS Resource Explorer
Relevant content
- asked 5 years ago
