Skip to content

feat: Add script to create AWS deployment service account#79

Merged
venkatamutyala merged 1 commit into
mainfrom
venkatamutyala-patch-2
Jun 19, 2026
Merged

feat: Add script to create AWS deployment service account#79
venkatamutyala merged 1 commit into
mainfrom
venkatamutyala-patch-2

Conversation

@venkatamutyala

Copy link
Copy Markdown
Contributor

This script creates a deployment service account in the current AWS account, including an IAM user and role with AdministratorAccess, while ensuring that existing accounts are not duplicated.

This script creates a deployment service account in the current AWS account, including an IAM user and role with AdministratorAccess, while ensuring that existing accounts are not duplicated.
Copilot AI review requested due to automatic review settings June 19, 2026 15:22
@venkatamutyala venkatamutyala merged commit fa497a1 into main Jun 19, 2026
3 checks passed
@venkatamutyala venkatamutyala deleted the venkatamutyala-patch-2 branch June 19, 2026 15:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new AWS helper script intended for “legacy prod” setup that creates a deployment IAM user + role (both with AdministratorAccess) in the currently authenticated AWS account, and avoids duplicating those resources by checking for pre-existence.

Changes:

  • Introduces tools/aws/legacy-prod-account-setup.sh to create captain-deployment-svc-account and glueops-captain-role in the current account.
  • Adds guardrails to exit early if the user or role already exists.
  • Outputs generated long-lived access keys and a sample EKS kubeconfig update command.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +36 to +39
if aws iam get-user --user-name "$IAM_USER_NAME" >/dev/null 2>&1; then
echo -e "${RED}User '$IAM_USER_NAME' already exists. Exiting.${RESET}"
exit 1
fi
Comment on lines +41 to +44
if aws iam get-role --role-name "$IAM_ROLE_NAME" >/dev/null 2>&1; then
echo -e "${RED}Role '$IAM_ROLE_NAME' already exists. Exiting.${RESET}"
exit 1
fi
Comment on lines +64 to +66
"Effect": "Allow",
"Principal": { "AWS": "arn:aws:iam::${ACCOUNT_ID}:root" },
"Action": "sts:AssumeRole"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants