Closed jamesbeltonIBM closed 6 years ago
Your SERVICE_INSTANCE_ID
looks a bit strange. Can you please check its correct?
If you take the below example of a credentials blob, you should use 65c5b3g2-7db5-4251-93a1-a7c33486d5e9
from the resource_instance_id
as your SERVICE_INSTANCE_ID
.
{
"apikey": "xAwuDUgkyuvrbc-theRestOfMyKeyIGoesHere_s5a1C8S",
"endpoints": "https://cos-service.bluemix.net/endpoints",
"iam_apikey_description": "Auto generated apikey during resource-key operation for Instance - crn:v1:bluemix:public:cloud-object-storage:global:a/3c467df9e6d84b89065fd00be3065964:65c5b3f1-7db5-4251-93a1-a7c33486d5d8::",
"iam_apikey_name": "auto-generated-apikey-e2d6c8db-6d8d-4d77-8ec4-9eb65f7b66f1",
"iam_role_crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer",
"iam_serviceid_crn": "crn:v1:bluemix:public:iam-identity::a/3c467df9e6d84b89065fd00be3065964::serviceid:ServiceId-b4b9b864-06f3-4b3c-815c-6ae2e1a14g05",
"resource_instance_id": "crn:v1:bluemix:public:cloud-object-storage:global:a/3c467ce9e6d84b90065fd00be3065964:65c5b3g2-7db5-4251-93a1-a7c33486d5e9::"
}
cheers @paul-carron - that works. I was pulling the similar value from iam_serviceid_crn in error, possibly because of the variable name it is given in the IBM Cloud docs. I might raise a change on that :) Thanks again!
I'm having real problems getting the simple 'list buckets' script to work using IAM. All I get is an 'ACCESS DENIED' error.
The code I am using is as follows - am running from the command line:
If I change the cos= part of the code to:
it works fine and it picks up my creds from my aws CLI installation. It's just when I try to use IAM creds I get access denied.