@@ -32,14 +32,57 @@ Note that the nix version must be at least `2.17` and `fetch-closure`,
3232
3333## AWS
3434
35- Create an AWS user with your name and ` AdministratorAccess ` policy in the
36- $REPO organization, then store your access key in
37- ` ~/.aws/credentials ` under the profile name ` $REPO ` :
35+ From the parent AWS org, create an IAM identity center user with your name and
36+ ` AdministratorAccess ` to the AWS account of the ` $REPO ` deployment, then store
37+ the config in ` ~/.aws/config ` under the profile name ` $REPO ` :
38+
39+ [sso-session $PARENT_ORG_NAME]
40+ sso_start_url = https://$IAM_CENTER_URL_ID.awsapps.com/start
41+ sso_region = $REGION
42+ sso_registration_scopes = sso:account:access
43+
44+ [profile $REPO]
45+ sso_session = $PARENT_ORG_NAME
46+ sso_account_id = $REPO_ARN_ORG_ID
47+ sso_role_name = AdministratorAccess
48+ region = $REGION
49+
50+ The ` $PARENT_ORG_NAME ` can be set to what you prefer, ex: ` ioe ` . The
51+ ` $IAM_CENTER_URL_ID ` and ` $REGION ` will be provided when creating your IAM
52+ identity center user and the ` $REPO_ARN_ORG_ID ` will be obtained in AWS as
53+ the ` $REPO ` org ARN account number.
54+
55+ If your AWS setup uses a flat or single org structure, then adjust IAM identity
56+ center account access and the above config to reflect this. The above config
57+ can also be generated from the devshell using:
58+
59+ aws configure sso
60+
61+ When adding additional profiles the ` aws configure sso ` command may create
62+ duplicate sso-session blocks or cause other issues, so manually adding new
63+ profiles is preferred. Before accessing or using ` $REPO ` org resources, you
64+ will need to start an sso session which can be done by:
65+
66+ just aws-sso-login
67+
68+ While the identity center approach above gives session based access, it also
69+ requires periodic manual session refreshes which are more difficult to
70+ accomplish on a headless system or shared deployer. For those use cases, IAM
71+ of the ` $REPO ` organization can be used to create an AWS user with your name and
72+ ` AdministratorAccess ` policy. With this approach, create an access key set for
73+ your IAM user and store them in ` ~/.aws/credentials ` under the profile name
74+ ` $REPO ` :
3875
3976 [$REPO]
4077 aws_access_key_id = XXXXXXXXXXXXXXXXXXXX
4178 aws_secret_access_key = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
4279
80+ No session initiation will be required and AWS resources in the org can be used
81+ immediately.
82+
83+ In the case that a profile exists in both ` ~/.aws/config ` and
84+ ` ~/.aws/credentials ` , the ` ~/.aws/config ` sso definition will take precedence.
85+
4386## AGE Admin
4487
4588While cluster secrets shared by all machines are generally handled using AWS
@@ -114,6 +157,13 @@ With that you can then get started with:
114157 # Find many other operations recipes to use
115158 just --list
116159
160+ Behind the scenes ssh is using AWS SSM and no open port 22 is required. In
161+ fact, the default template for a cardano-parts repo does not open port 22 for
162+ ingress on security groups.
163+
164+ For special use cases which still utilize port 22 ingress for ssh, ipv4 or ipv6
165+ ssh_config can be used by appending ` .ipv4 ` or ` .ipv6 ` to the target hostname.
166+
117167## Colmena
118168
119169To deploy changes on an OS level, we use the excellent
0 commit comments