---
title: "Inline IAM Policy With Wasabi"
slug: "how-to-use-inline-iam-policy-with-wasabi"
updated: 2026-02-10T18:10:34Z
published: 2026-02-10T18:10:34Z
canonical: "docs.wasabi.com/how-to-use-inline-iam-policy-with-wasabi"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wasabi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Inline IAM Policy With Wasabi

Wasabi supports the use of [inline IAM policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_managed-vs-inline.html#inline-policies) via API/SDKs. These inline policies cannot be operated, managed, or viewed using the Wasabi Console. This article describes how an inline IAM policy can be used via API calls to the Wasabi system through a third-party S3 application [AWS CLI](/v1/docs/how-do-i-use-aws-cli-with-wasabi). You can use any supported API/SDK mechanism to do this based on your requirements.

To attach an inline policy to an IAM user:

1. Create a new IAM user called **username-aws-cli-lab-inline-user**:

```powershell
aws iam create-user --user-name username-aws-cli-lab-inline-user --endpoint-url=https://iam.wasabisys.com --profile=
```

![](https://cdn.document360.io/bef0a1ea-7768-4d5a-b520-c4fe2f7fafad/Images/Documentation/image-BVL4G4QU.png)
2. Create a new bucket for this task called **bucket-aws-cli-lab-inline-bucket**:

```powershell
aws s3 mb s3://bucket-aws-cli-lab-inline-bucket --endpoint-url=https://s3.wasabisys.com --profile=
```

![](https://cdn.document360.io/bef0a1ea-7768-4d5a-b520-c4fe2f7fafad/Images/Documentation/image-AXIZX5CH.png)
3. Attach an inline example policy that allows this new user access to the new bucket only.

The example policy created is the inline_policy.json file.

```powershell
{
                "Version": "2012-10-17",
                "Statement": [{
                "Sid": "AllowAll-S3ActionsToOwnBucket",
                "Effect": "Allow",
                "Action": "s3:*",
                "Resource": "arn:aws:s3:::bucket-aws-cli-lab-inline-bucket*"
                }]
                }
```

```powershell
aws iam put-user-policy --user-name username-aws-cli-lab-inline-user --policy-name inline_user_separation --policy-document file://inline_policy.json --endpoint-url=https://iam.wasabisys.com --profile=
```

![](https://cdn.document360.io/bef0a1ea-7768-4d5a-b520-c4fe2f7fafad/Images/Documentation/70pnqgixu06fqushpjo7fgmceclip10.png)
4. List the inline policy via the AWS CLI:

```powershell
aws iam list-user-policies --user-name username-aws-cli-lab-inline-user --endpoint-url=https://iam.wasabisys.com --profile=
```

![](https://cdn.document360.io/bef0a1ea-7768-4d5a-b520-c4fe2f7fafad/Images/Documentation/image-7HM3C8HR.png)
5. Show the inline policy document via the AWS CLI:

```powershell
aws iam get-user-policy --user-name username-aws-cli-lab-inline-user --policy-name inline_user_separation --endpoint-url=https://iam.wasabisys.com --profile=
```

![](https://cdn.document360.io/bef0a1ea-7768-4d5a-b520-c4fe2f7fafad/Images/Documentation/image-AKAW7749.png)
