---
title: "Managing your S3 Buckets with s3cmd"
date: "2024-10-23T14:37:07+00:00"
summary:
image:
type: "article"
url: "/acquia-cloud-platform/help/93576-managing-your-s3-buckets-s3cmd"
id: "e66ceee7-280c-4b31-9a74-f48cb1bba7f8"
---

Acquia provides the `s3cmd` command line utility to manage Amazon S3 Buckets.

If you encounter either of these errors while using the `s3cmd --configure` command, follow the provided workaround:

    ERROR: Test failed: 400 (InvalidToken): The provided token is malformed or otherwise invalid.

    ERROR: Test failed: 403 (SignatureDoesNotMatch): The request signature we calculated does not match the signature you provided. Check your key and signing method.

**Workaround:**

1.  [Create an IAM user in your S3 console](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users.html) or visit the permissions for an existing IAM user.
2.  [Ensure that the IAM user has the permissions](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_change-permissions.html) to do things you want the \`s3cmd\` to do.
    
    For example, `ListAllMyBuckets` is required for `s3cmd ls`.
    
3.  From the **Security credentials** tab of the IAM user, [create a new Access Key ID](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html).
    
    One user can only have two access keys. If you need more keys, create another IAM user.
    
4.  Create [Environment Variables](/node/56164) for the ID and key. Use `AWS_ACCESS_KEY_ID` as the label for the access key ID, and `AWS_SECRET_ACCESS_KEY` for the secret access key.
    
    The variables will be available to you in your Drupal application and through [SSH](/node/56290), which is `s3cmd` in new shell after you create the environment variables.
    

After you follow these steps, try it out: `s3cmd ls` will list all of your buckets. You can also run `s3cmd --help` to list all the commands possible.

Note

*   You will be interacting with buckets outside of Acquia's control, so our support will be limited to troubleshooting some of the preceding steps.
*   The `s3cmd` executable on the platform is provided as a courtesy. If it is outdated or has issues, you can seek alternative methods to interact with your S3 Buckets.

For additional information, visit [https://s3tools.org/s3cmd-howto](https://s3tools.org/s3cmd-howto).