generated from cds-snc/project-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add AWS Dev module for testing AWS integrations service (will b…
…e removed)
- Loading branch information
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
"""Testing AWS service (will be removed)""" | ||
import os | ||
|
||
from integrations.aws import identity_store, client as aws_client | ||
from dotenv import load_dotenv | ||
|
||
load_dotenv() | ||
|
||
|
||
def aws_dev_command(client, body, respond): | ||
groups = identity_store.list_groups() | ||
if not groups: | ||
respond("There was an error retrieving the groups.") | ||
return | ||
respond(f"Found {len(groups)} groups.") | ||
for k, v in groups[0].items(): | ||
print(f"{k}: {v}") | ||
|
||
users = identity_store.list_users() | ||
if not users: | ||
respond("There was an error retrieving the users.") | ||
return | ||
respond(f"Found {len(users)} users.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters