Closed neumannrf closed 4 years ago
Thanks for taking the time to raise this ticket and provide a detailed explanation. I've spoken with the SDK architects, we've added this enhancement to the list of items to be considered in the next major version release. If you are happy with this resolution please close the ticket, otherwise please let me know any further questions/issues you have.
Thanks @stephenskinner for the feedback!
For an enhanced user experience, the
ibmcloud
command-line tool andibm-cos-sdk
Python library should be seamlessly interoperable.If the service credentials are retrieved using
The resource creation command gives a
ConfigParseError
:That happens because the JSON object written by
ibmcloud
is a list with only one JSON object, whileibm-cos-sdk
is expecting a dictionary. Hence the errorAttributeError: 'list' object has no attribute 'keys'
.To circumvent this, one can parse the JSON list with
jq
and useThat yields a successful
but then fails when I call
get_buckets()
:I can only make it work by copying and pasting the contents of the service credentials JSON file into
ibm_boto3.resource()
as shown here.