Skip to content

Commit 7dae3a6

Browse files
committed
Apply changes to IAM role gathering for EKS Admin
1 parent 163dac6 commit 7dae3a6

File tree

2 files changed

+12
-17
lines changed

2 files changed

+12
-17
lines changed

README.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,7 @@ Before deploying the POSIT-SCE on AWS EKS, ensure you have the following prerequ
2222

2323
## Getting Started
2424

25-
1. Clone this repository:
26-
27-
```bash
28-
mwinit #Make sure you are authenticated into Midway TODO: Remove before publish
29-
git clone git@ssh.gitlab.aws.dev:open-source/posit-sce.git
30-
cd posit-sce
31-
```
32-
25+
1. Clone this repository
3326
2. Install the required dependencies:
3427

3528
```bash
@@ -44,7 +37,12 @@ Before deploying the POSIT-SCE on AWS EKS, ensure you have the following prerequ
4437
npm install
4538
```
4639

47-
Be sure to authenticate the AWS CLI, please see [this link](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html) for guidance.
40+
Be sure to authenticate the AWS CLI, please see [this link](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html) for guidance. Make sure to note down the (or one of) the IAM Role ARN's the CLI has assumed or that the IAM user has been assigned.
41+
This role is required in the setup to provide administrative rights to the current session for configuration of the Kubernetes cluster.
42+
You can find out which user or role is assumed via the following command:
43+
```
44+
aws sts get-caller-identity
45+
```
4846
 
4947

5048
3. Deploy the POSIT-SCE on AWS EKS:

run.sh

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,10 @@
33
gather_parameters_deploy() {
44
read -p "Deployment identifier [posit-sce]: " stack_name
55
stack_name=${stack_name:-posit-sce}
6-
ROLE_ARN=$(aws sts get-caller-identity --output text --query 'Arn')
7-
echo "Do you want to use the following role for Admin rights to the EKS Cluster?"
8-
echo "Role: $ROLE_ARN"
9-
if ! read_yes_no; then
10-
read -p "What is the role ARN: " role
11-
ROLE_ARN=$role
12-
fi
13-
export CURRENT_ROLE_ARN=$ROLE_ARN
6+
echo "Please provide the IAM Role that is assigned to the current authenticated user."
7+
echo "This role will be granted Admin rights on the EKS cluster for the setup."
8+
read -p "ARN: " role
9+
export CURRENT_ROLE_ARN=$role
1410
export ssl=false
1511
export domain=false
1612
echo "Do you want to use a custom domain name?"
@@ -76,6 +72,7 @@ check_aws_authentication() {
7672
current_region=$(aws ec2 describe-availability-zones --output text --query 'AvailabilityZones[0].[RegionName]')
7773
if [[ $? -eq 0 ]]; then
7874
echo "AWS CLI is authenticated."
75+
echo "Admin Role: $CURRENT_ROLE_ARN"
7976
echo "Account Number: $aws_identity"
8077
echo "The selected AWS Region is: $current_region"
8178
else

0 commit comments

Comments
 (0)