AWS Delegate Resources - "Missing Credentials in config"

I’ve followed the documentation here, specifically calling the Auth0 client library found at the bottom of the page:

I am able to successfully return delegationResult.Credentials which contains the following properties:

  • SecretAccessKey
  • AccessKeyId
  • SessionToken

I’m not sure exactly which one I should be using and passing to my AWS credentials configuration, but regardless, no matter which one I try I receive the following error whenever I attempt to call s3bucket.putObject(): Missing Credentials in config

This is where the documentation ends which is unfortunate because I feel I am very close.

The configuration of my s3 bucket looks something like this:

s3.config.credentials = new AWS.WebIdentityCredentials({
      RoleArn: AWS_ROLE_ARN,

As I mentioned, I’m not sure which one of the 3 properties to use in place of DELEGATE_TOKEN_RETURNED_FROM_AUTH0, but I have attempted to use all three.

Anyone have any ideas what I’m doing wrong?



I was able to find my answer. Rather than using new AWS.WebIdentityCredentials I was able to assign all of the information returned from delegationResult.Credentials into my S3 instance:

s3 = new AWS.S3({
    params: {
        Bucket: [bucket_name]
      credentials: {
      accessKeyId: [access_key_id],
      sessionToken: [session_token]