# AWS Delegate Resources - "Missing Credentials in config"

**URL:** <https://community.auth0.com/t/aws-delegate-resources-missing-credentials-in-config/7968>\
**Category:** Get Help\
**Tags:** aws-delegation, aws\
**Created:** [August 25, 2017, 2:57am UTC](https://community.auth0.com/t/aws-delegate-resources-missing-credentials-in-config/7968 "2017-08-25T02:57:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mcarreiro](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mcarreiro/32/7155_2.png) [@mcarreiro](https://community.auth0.com/u/mcarreiro)\
**Post date:** [August 25, 2017, 2:57am UTC](https://community.auth0.com/t/aws-delegate-resources-missing-credentials-in-config/7968/1 "2017-08-25T02:57:31Z")

</div>

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

> **[Integrate with Amazon Web Services and Products - Auth0 Docs](https://auth0.com/docs/customize/integrations/aws)**
>
> List of Amazon products and services, including Amazon Web Services (AWS) for identity and access management (IAM) with Auth0.

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,
      WebIdentityToken: DELEGATE_TOKEN_RETURNED_FROM_AUTH0
});

```

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?

Thanks!

-Mikey

---

<div class="post-metadata">

**Author:** ![mcarreiro](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mcarreiro/32/7155_2.png) [@mcarreiro](https://community.auth0.com/u/mcarreiro)\
**Post date:** [August 25, 2017, 9:32pm UTC](https://community.auth0.com/t/aws-delegate-resources-missing-credentials-in-config/7968/2 "2017-08-25T21:32:27Z")

</div>

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: {
      secretAccessKey:[secret_access_key],
      accessKeyId: [access_key_id],
      sessionToken: [session_token]
   }
});

```

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 2, 2018, 5:56am UTC](https://community.auth0.com/t/aws-delegate-resources-missing-credentials-in-config/7968/3 "2018-03-02T05:56:07Z")

</div>


