Open
Description
Hey community
I'm developing an OCI Function that uploads files to an OCI Object Storage bucket. I'm using the following libraries:
const common = require('oci-common');
const os = require('oci-objectstorage');
The function runs in the OCI Functions environment, and for authentication, I'm trying to use ResourcePrincipalAuthenticationDetailsProvider
.
However, when initializing the ObjectStorageClient
like this:
const provider = new common.ResourcePrincipalAuthenticationDetailsProvider();
const client = new os.ObjectStorageClient({
authenticationDetailsProvider: provider
});
I get the following error during function execution:
Additional Information:
package.json
{
"name": "oci-function-upload",
"version": "0.0.1",
"description": "example function",
"main": "func.js",
"author": "",
"license": "Apache-2.0",
"dependencies": {
"@fnproject/fdk": "^0.0.78",
"busboy": "^1.6.0",
"oci-common": "^2.109.0",
"oci-objectstorage": "^2.109.0"
}
}
func.yaml
schema_version: 20180708
name: upload
version: 0.0.1
runtime: node
entrypoint: node func.js
memory: 256
timeout: 30
Is there any specific configuration required for ResourcePrincipalAuthenticationDetailsProvider
to work properly inside an OCI Function with Node.js?
Thank you in advance to anyone who can help or provide any guidance on this issue.
Metadata
Metadata
Assignees
Labels
No labels