# S3 snapshot failing with error Member must have length greater than or equal to 20

**URL:** <https://discuss.elastic.co/t/s3-snapshot-failing-with-error-member-must-have-length-greater-than-or-equal-to-20/314866>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [September 21, 2022, 12:27pm UTC](https://discuss.elastic.co/t/s3-snapshot-failing-with-error-member-must-have-length-greater-than-or-equal-to-20/314866 "2022-09-21T12:27:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maksym\_Postument](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/maksym_postument/32/106661_2.png) [@Maksym\_Postument](https://discuss.elastic.co/u/Maksym_Postument)\
**Post date:** [September 21, 2022, 12:27pm UTC](https://discuss.elastic.co/t/s3-snapshot-failing-with-error-member-must-have-length-greater-than-or-equal-to-20/314866/1 "2022-09-21T12:27:28Z")

</div>

Hello, i m trying to configure s3 backup on cluster created with eck.  
I createad iam role and service account. Specified pods to use this service account. Then i added initcontainer

```auto
          initContainers:
          - command:
            - sh
            - -c
            - mkdir -p "/usr/share/elasticsearch/config/repository-s3"; ln -s $AWS_WEB_IDENTITY_TOKEN_FILE
              "/usr/share/elasticsearch/config/repository-s3/aws-web-identity-token-file"
            name: symlink-token

```

Then i registered repository using kibana UI. And when i click verify i am getting this error

```auto
        "caused_by": {
          "type": "i_o_exception",
          "reason": "Unable to upload object [tests-JAHXXjP0SVOG4nMYgNaXYw/master.dat] using a single upload",
          "caused_by": {
            "type": "sdk_client_exception",
            "reason": "sdk_client_exception: Unable to load AWS credentials from any provider in the chain: [org.elasticsearch.repositories.s3.S3Service$CustomWebIdentityTokenCredentialsProvider@37967d45: 1 validation error detected: Value 'initContainers' at 'roleArn' failed to satisfy constraint: Member must have length greater than or equal to 20 (Service: AWSSecurityTokenService; Status Code: 400; Error Code: ValidationError; Request ID: 8d0e30dd-7adf-437d-b24a-d69977a3d3a4), com.amazonaws.auth.EC2ContainerCredentialsProviderWrapper@2301c8e9: Unauthorized (Service: null; Status Code: 401; Error Code: null; Request ID: null)]"
          }
        }
      },
      "status": 500
    },

```

I don't understand why it trying to use initContainers as role arn and how to change it

---

<div class="post-metadata">

**Author:** ![Maksym\_Postument](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/maksym_postument/32/106661_2.png) [@Maksym\_Postument](https://discuss.elastic.co/u/Maksym_Postument)\
**Post date:** [September 21, 2022, 12:29pm UTC](https://discuss.elastic.co/t/s3-snapshot-failing-with-error-member-must-have-length-greater-than-or-equal-to-20/314866/2 "2022-09-21T12:29:39Z")

</div>

Never mind it was a typo in config

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 19, 2022, 12:30pm UTC](https://discuss.elastic.co/t/s3-snapshot-failing-with-error-member-must-have-length-greater-than-or-equal-to-20/314866/3 "2022-10-19T12:30:24Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
