0

Staring at this but can't figure out what's the error, Trying to give user (in principle) access to bucket mentioned in resource.


{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Principal": {
                "AWS": "arn:aws:iam::000000:user/username"
            
            }
            },
            "Action": ["s3:ListBucket"],
            "Resource": "arn:aws:s3:::bucketname"
        }
    ]
}


Error: Parse error on line 10: ... } }, "Action": ["s3:ListBucket"],

Expecting 'EOF', '}', ',', ']', got ':'

edited a few times but no luck, new to this.

1 Answer 1

1

There is an extra } below the line "AWS": "arn:aws:iam::000000:user/username". Please find the fixed json below.

{
    "Version": "2012-10-17",
    "Statement":
    [
        {
            "Effect": "Allow",
            "Principal":
            {
                "AWS": "arn:aws:iam::000000:user/username"
            },
            "Action":
            [
                "s3:ListBucket"
            ],
            "Resource": "arn:aws:s3:::bucketname"
        }
    ]
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.