I am trying to upload a document via the Java SDK v1 using the code from this example:
https://docs.aws.amazon.com/code-samples/latest/catalog/java-workdocs-upload_user_doc.java.html
Everything goes well until I call the complete_upload() method, which in turn tries to invoke an updateDocumentVersion() method - which fails with an UnauthorizedResourceAccessException.
So:
- uploading works (or seems to)
- downloading works
- other operation wich as getting subfolders and getting documents in folders etc work
- updateDocumentVersion() does not work
I have initialized the client with the access key and secret key of a IAM user to which I have given permission of type "WorkDocs: FullAccess".
Any idea about why the updateDocumentVersion() returns an UnauthorizedResourceAccessException?
Piercarlo