User Management
Log in to the console https://console.aws.amazon.com/console/home?region=us-east-1
- Go to IAM service https://console.aws.amazon.com/iam/
- Go to Users https://console.aws.amazon.com/iam/home#/users
- Click
Add user - Provide a user name. On the
access typepickAWS Management Console accessand specify a password for the user - Permissions
- Admin: On the next tab, that provides permissions select
Copy permissions from existing userand pickmkosinskiorsmuschuser if you want this user to be an Admin - External programmer: On the next tab, that provides permissions select
Attach existing policies directlyand select the Policy that enables to work only with specific S3 bucket, if you want this user to be just a Worker, like an external programmer. (This policy needs to exist prior to this step. The creation is described in the next chapter).
- Admin: On the next tab, that provides permissions select
- Keep clicking next, until the new user is done
- New user can load through https://895465320602.signin.aws.amazon.com/console
The main use case here is to limit access for external contractors (like external programmers) to specific folders.
-
Go to Policies
-
Click
Create policy -
Pick
JSONformat -
Put this JSON (fill 3 places for a directory name/ DIR_NAME) that allows to work with specific directory inside the monorepo-data S3 Bucket
-
Click
Review policyand changeDIR_NAMEfrom the below to the actual directory name{ "Version": "2012-10-17", "Statement": [ { "Sid": "AllowUserToSeeBucketListInTheConsole", "Action": [ "s3:ListAllMyBuckets", "s3:GetBucketLocation" ], "Effect": "Allow", "Resource": [ "arn:aws:s3:::*" ] }, { "Sid": "AllowRootAndHomeListingOfCompanyBucket", "Action": [ "s3:ListBucket" ], "Effect": "Allow", "Resource": [ "arn:aws:s3:::monorepo-data" ], "Condition": { "StringEquals": { "s3:prefix": [ "", "DIR_NAME/" ], "s3:delimiter": [ "/" ] } } }, { "Sid": "AllowListingOfUserFolder", "Action": [ "s3:ListBucket" ], "Effect": "Allow", "Resource": [ "arn:aws:s3:::monorepo-data" ], "Condition": { "StringLike": { "s3:prefix": [ "DIR_NAME/*" ] } } }, { "Sid": "AllowAllS3ActionsInUserFolder", "Effect": "Allow", "Action": [ "s3:*" ], "Resource": [ "arn:aws:s3:::monorepo-data/DIR_NAME/*" ] } ] } -
Click
Create policyafter you invent a name
- At the
IAM Service list Users select the specific user and click
Add permissions - Select
Attach existing policies directlyand pick the Policy from the list - Click
ReviewandAdd permissions