As I run the code, it is denying access to my COS instance. How do I set access so the access is not denied? I am suspecting I ended up giving incorrect bucket name. I used the bucket name as found in COS bucket menu.
ClientError Traceback (most recent call last)
in ()
1 # TRANSCRIBE – this is where STT receives the OGG files provided and returns text to TRANSCRIPT
2 # this is a test of ONE transcription in the list - place '0' - may take a minute
----> 3 transcript = analyze_sample(file_list[0])
4 visualize(transcript)
in analyze_sample(sample)
33 audio = streaming_body.read()
34 text = get_transcript(audio)
---> 35 client.put_object(Bucket = credentials_os['BUCKET'], Key = sample.split('.')[0] + '_text.json', Body = text)
36 return text
37
/usr/local/src/conda3_runtime/home/envs/DSX-Python35-Spark/lib/python3.5/site-packages/ibm_botocore/client.py in _api_call(self, *args, **kwargs)
251 "%s() only accepts keyword arguments." % py_operation_name)
252 # The "self" in this scope is referring to the BaseClient.
--> 253 return self._make_api_call(operation_name, kwargs)
254
255 _api_call.__name__ = str(py_operation_name)
/usr/local/src/conda3_runtime/home/envs/DSX-Python35-Spark/lib/python3.5/site-packages/ibm_botocore/client.py in _make_api_call(self, operation_name, api_params)
541 error_code = parsed_response.get("Error", {}).get("Code")
542 error_class = self.exceptions.from_code(error_code)
--> 543 raise error_class(parsed_response, operation_name)
544 else:
545 return parsed_response
ClientError: An error occurred (AccessDenied) when calling the PutObject operation: Access Denied
As I run the code, it is denying access to my COS instance. How do I set access so the access is not denied? I am suspecting I ended up giving incorrect bucket name. I used the bucket name as found in COS bucket menu.
ClientError Traceback (most recent call last)