# Bucket policy support

Hello! Currently, the documentation states that we can use IAM policies for buckets ( [Authentication & Authorization \| Tigris Object Storage Documentation](/content/docs/concepts/authnz/#authorization/index.html)).

But when I try to do that it gives me the following error:

! [error screenshot](https://global.discourse-cdn.com/fly1/optimized/3X/6/e/6e9a8eb23bbd5c2a9f8ebfdeefd302b06e5e031c_2_690x112.png)

How can I attach policies to buckets? Or create policies using the AWS CLI?

[Authentication & Authorization \| Tigris Object Storage Documentation](/content/docs/concepts/authnz/index.html)

Tigris, being S3-compatible, offers S3-supported authentication and

Solution

Hi

The bug is fixed and deployed. You can use it as follows:

1. Create IAM policy

```
   aws iam --endpoint=https://fly.storage.tigris.dev:8009/ create-policy --policy-name=policy1 --policy-document file:///path/to/policy.json
```

2. Attach it to a user

```
   aws iam --endpoint=https://fly.storage.tigris.dev:8009/ attach-user-policy --policy-arn=<arn> --user-name=<access_key_id>
```

3. Verify attachment

```
   aws iam --endpoint=https://fly.storage.tigris.dev:8009/ list-user-policies --user-name=<access_key_id>
```

---

Hi

There are two things wrong here

1. The AWS command should look like this for IAM operations

```
aws iam --region=auto --endpoint=https://idev-tigris-os.fly.dev:8009/ create-policy --policy-name=policy1 --policy-document file:///Users/USER/projects/iam_test/policy1.json
```

**Note:**

- the IAM server is served at port 8009.
- policy creation is an IAM API.

2. There is a bug in the IAM implementation that fails to accept signed requests by access key. The bug will be fixed and an update will be provided here.

If you need high‑level read/write permissions, you can also use the dashboard in the meantime to adjust permissions.

`fly storage dashboard`

---

The bug is fixed and deployed. You can use it as follows:

1. Create IAM policy

```
   aws iam --endpoint=https://fly.storage.tigris.dev:8009/ create-policy --policy-name=policy1 --policy-document file:///path/to/policy.json
```

2. Attach it to a user

```
   aws iam --endpoint=https://fly.storage.tigris.dev:8009/ attach-user-policy --policy-arn=<arn> --user-name=<access_key_id>
```

3. Verify attachment

```
   aws iam --endpoint=https://fly.storage.tigris.dev:8009/ list-user-policies --user-name=<access_key_id>
```

Thank you! I’m using a Laravel project now and will configure tigris with this!

We are aiming to simplify the permission system and offer high‑level basic roles. I added more docs here: [https://www.tigrisdata.com/docs/concepts/authnz/#authorization](/content/docs/concepts/authnz/#authorization/index.html)
