I am trying to register a snapshot repository on AWS Elasticsearch/OpenSearch. I am getting the following error: "Message":"User: anonymous is not authorized to perform: iam:PassRole on resource: arn:aws:iam::$$$$$:user/Elasticsearch"}
Below is my curl command:
curl -XPUT http://search-ecs-alblogs-@@@@@.us-west-2.es.amazonaws.com/_snapshot/es_snap -d \
'{
"type":"fs",
"settings":{
"location":"home/user/backup",
"compress":true,
"access_key":"@@@@@@",
"secret_key":"@@@@",
"region":"us-west-2",
"role_arn":"arn:aws:iam::@@@@@:user/Elasticsearch"
}
}'
AWS Elasticsearch doesn't allow you to store snapshots on type 'fs". All snapshots must be stored in S3.
For more detail, you can read through documentation: Creating index snapshots in Amazon OpenSearch Service