Skip to content

Commit

Permalink
list user profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
mlin committed Jun 28, 2022
1 parent 1506531 commit 7b2ab78
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@
client_opts["region_name"] = env["region"]
sagemaker = boto3.client("sagemaker", **client_opts)
domain_desc = sagemaker.describe_domain(DomainId=studio_domain_id)
if studio_user_profile_names == ["*"]:
lup = sagemaker.list_user_profiles(DomainIdEquals=studio_domain_id)
assert "NextToken" not in lup # TODO paginate query for >100 users
studio_user_profile_names = [
up["UserProfileName"] for up in lup["UserProfiles"] if up["Status"] == "InService"
]
user_profile_desc = dict(
(nm, sagemaker.describe_user_profile(DomainId=studio_domain_id, UserProfileName=nm))
for nm in studio_user_profile_names
Expand Down
2 changes: 1 addition & 1 deletion miniwdl_gwfcore_studio/miniwdl_gwfcore_studio_stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def __init__(
f"StudioFSAPuid{uid}x",
file_system=studio_efs,
posix_user=cdk_efs.PosixUser(uid=uid, gid=uid),
path=f"/{uid}/miniwdl",
path=f"/{uid}",
)

def __del__(self):
Expand Down

0 comments on commit 7b2ab78

Please sign in to comment.