ITOps Agent - AWS IAM Service Account Provisioning
Purpose: Step-by-step guide to provision a service account (beaksvc-itops) for the Beak ITOps AI agent to perform basic AWS IAM user lifecycle management operations.
Scope: Create User, Update User Info, Password/Credential Reset
Estimated Time to Complete: 2-3 hours (including testing)
Executive Summary
This document provides a condensed, action-oriented guide to:
- Create an AWS IAM service account (
beaksvc-itops) - Attach minimal required permissions via a custom IAM policy
- Generate API access keys for Beak agent integration
- Enable audit logging via CloudTrail
- Validate the setup with quick tests
- Hand off credentials to Beak implementation team
Prerequisites
Before starting, ensure you have:
- ✅ AWS account with administrative access
- ✅ Permission to create IAM users and policies
- ✅ Permission to enable CloudTrail
- ✅ Secure storage for access keys (AWS Secrets Manager or credential vault)
- ✅ AWS account ID (12-digit number):
__________________
Step 1: Create IAM Service Account
Time: 15 minutes
1.1 Access AWS IAM Console
- Log into AWS Management Console
- Navigate to IAM service
- In the left sidebar, click Users
- Click Create user button
1.2 Configure User Details
- User name: Enter
beaksvc-itops - Provide user access to the AWS Management Console: Leave UNCHECKED (programmatic access only)
- Click Next
1.3 Set Permissions
- On the "Set permissions" page, select Attach policies directly
- Do NOT attach any policies yet (we'll create a custom policy in Step 2)
- Click Next
1.4 Review and Create
- Review the configuration
- Click Create user
- ✓ Service account
beaksvc-itopscreated successfully
Step 2: Create Custom IAM Policy
Time: 20 minutes
2.1 Navigate to Policy Creation
- In AWS Management Console, go to IAM > Policies
- Click Create policy button
- Click the JSON tab
2.2 Add Policy Document
Copy and paste the following JSON policy. Replace ACCOUNT_ID with your 12-digit AWS account ID:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowCreateUser",
"Effect": "Allow",
"Action": [
"iam:CreateUser",
"iam:CreateAccessKey",
"iam:CreateLoginProfile"
],
"Resource": "arn:aws:iam::ACCOUNT_ID:user/itops/*"
},
{
"Sid": "AllowUpdateUserAttributes",
"Effect": "Allow",
"Action": [
"iam:UpdateUser",
"iam:TagUser",
"iam:UntagUser",
"iam:GetUser",
"iam:ListUserTags"
],
"Resource": "arn:aws:iam::ACCOUNT_ID:user/itops/*"
},
{
"Sid": "AllowPasswordReset",
"Effect": "Allow",
"Action": [
"iam:UpdateAccessKey",
"iam:CreateAccessKey",
"iam:DeleteAccessKey",
"iam:GetAccessKeyLastUsed",
"iam:ListAccessKeys"
],
"Resource": "arn:aws:iam::ACCOUNT_ID:user/itops/*"
},
{
"Sid": "AllowGroupManagement",
"Effect": "Allow",
"Action": [
"iam:AddUserToGroup",
"iam:RemoveUserFromGroup",
"iam:GetGroup",
"iam:ListGroupsForUser"
],
"Resource": [
"arn:aws:iam::ACCOUNT_ID:user/itops/*",
"arn:aws:iam::ACCOUNT_ID:group/itops/*"
]
},
{
"Sid": "AllowListAndRead",
"Effect": "Allow",
"Action": [
"iam:ListUsers",
"iam:ListGroups",
"iam:ListPolicies",
"iam:GetUserPolicy",
"iam:ListUserPolicies",
"iam:ListAttachedUserPolicies"
],
"Resource": "*"
}
]
}
2.3 Review and Create Policy
- Click Next
- Policy name:
BeakIAMUserManagement - Description:
Service account policy for Beak ITOps agent to manage IAM users and credentials - Click Create policy
- ✓ Policy
BeakIAMUserManagementcreated successfully
Step 3: Attach Policy to Service Account
Time: 10 minutes
3.1 Navigate to User
- Go to IAM > Users
- Click beaksvc-itops
3.2 Attach Policy
- Click the Permissions tab
- Click Add permissions > Attach policies directly
- Search for
BeakIAMUserManagement - Select the checkbox next to the policy name
- Click Add permissions
3.3 Verify
- Confirm the policy appears in the "Permissions" section
- ✓ Policy attached successfully
Step 4: Generate Access Keys
Time: 10 minutes
4.1 Create Access Key
- On the beaksvc-itops user page, click Security credentials tab
- In the "Access keys" section, click Create access key
- Select Application running outside AWS
- Click Next
- (Optional) Description:
Beak ITOps AI Agent - IAM Management - Click Create access key
4.2 Save Credentials Securely
⚠️ IMPORTANT: These credentials will only be shown once. Save them immediately.
- Copy Access Key ID → Save to secure location
- Copy Secret Access Key → Save to secure location
- Recommended: Store in AWS Secrets Manager or credential vault
DO NOT:
- ❌ Share via email or chat
- ❌ Commit to code repositories
- ❌ Store in plain text files
- ❌ Take screenshots unencrypted
4.3 Verify Access Key
- Check the status shows Active
- Note the creation date
- ✓ Access keys generated and secured
Step 5: Enable CloudTrail Audit Logging
Time: 15 minutes
5.1 Navigate to CloudTrail
- Go to CloudTrail service
- Click Create trail (or use existing trail)
5.2 Configure Trail
- Trail name:
beaksvc-itops-audit - S3 bucket: Create new bucket or use existing:
cloudtrail-logs-ACCOUNT_ID - Enable CloudTrail log file validation: ✅ CHECKED
- Include global service events: ✅ CHECKED
- Click Create trail
5.3 Verify CloudTrail Status
- Navigate to CloudTrail > Trails
- Confirm trail Status: Logging is ON
- ✓ CloudTrail enabled for audit logging
Step 6: Quick Validation Tests
Time: 30 minutes
Test 1: Verify Access Key Works
- On your local machine, configure AWS CLI with the access key:
aws configure
# Enter: Access Key ID
# Enter: Secret Access Key
# Enter: Region (e.g., us-east-1)
# Enter: Output format (e.g., json)
- Run a simple test command:
aws iam list-users
- Expected Result: List of users returned without errors
- Status: ✅ PASS / ❌ FAIL
Test 2: Create Test User
- Run:
aws iam create-user --user-name test-user-itops-001
- Verify in AWS Console: IAM > Users > Confirm
test-user-itops-001appears - Status: ✅ PASS / ❌ FAIL
Test 3: Update User Attributes
- Run:
aws iam tag-user --user-name test-user-itops-001 --tags Key=Environment,Value=Testing
- Verify: Get the user details and confirm tag appears
- Status: ✅ PASS / ❌ FAIL
Test 4: Create Access Key (Password Reset)
- Run:
aws iam create-access-key --user-name test-user-itops-001
- Verify: New access key created with status "Active"
- Status: ✅ PASS / ❌ FAIL
Test 5: Verify CloudTrail Logging
- Go to CloudTrail > Event history
- Filter by Username:
beaksvc-itops - Verify events logged:
- ✅ CreateUser
- ✅ TagUser
- ✅ CreateAccessKey
- Status: ✅ PASS / ❌ FAIL
Cleanup
- Delete test user:
aws iam delete-access-key --user-name test-user-itops-001 --access-key-id <KEY_ID>
aws iam delete-user --user-name test-user-itops-001
All 5 tests must PASS before proceeding to handoff
Step 7: Provide Credentials to Beak Implementation Team
Time: 10 minutes
Gather and securely provide the following information:
Required Credentials
AWS Account ID: __________________
Service Account Username: beaksvc-itops
Access Key ID: __________________
Secret Access Key: __________________
Primary AWS Region: __________________
Policy Information
Policy Name: BeakIAMUserManagement
Policy ARN: arn:aws:iam::ACCOUNT_ID:policy/BeakIAMUserManagement
User Path Scope: /itops/*
Audit & Compliance
CloudTrail Trail Name: beaksvc-itops-audit
S3 Bucket for Logs: cloudtrail-logs-ACCOUNT_ID
Log File Validation: Enabled ✓
Operational Details
Allowed Operations: Create User, Update User Info, Reset Credentials
User Path: /itops/* (only users matching this path)
Delivery Method:
- Encrypt credentials before sending
- Use secure file transfer or password-protected document
- Deliver in separate communication channel from attachments
- Confirm receipt from Beak team
Step 8: Security Checkpoints
Before handoff, verify:
- beaksvc-itops IAM user exists
- BeakIAMUserManagement policy is attached
- Access keys generated and stored securely
- CloudTrail enabled and logging
- All 5 validation tests PASSED
- Credentials stored in secure location (Secrets Manager, vault, etc.)
- No other access keys exist for this user
- Console login disabled for this account
- Approval documentation complete
Troubleshooting
| Issue | Solution |
|---|---|
| Access Denied creating user | Verify BeakIAMUserManagement policy is attached to beaksvc-itops |
| Can't generate access key | Ensure beaksvc-itops is enabled and no access key restrictions exist |
| CloudTrail not logging | Verify S3 bucket exists and has write permissions for CloudTrail |
| Access key not working | Verify access key is Active (not Inactive), correct region specified |
| Policy permissions error | Replace ACCOUNT_ID with actual 12-digit account ID in policy JSON |
Quick Reference
Service Account Details
Account Name: beaksvc-itops
Account Type: IAM User (programmatic access)
Console Access: None
CloudTrail Logging: Enabled
IAM Policy
Policy Name: BeakIAMUserManagement
Scope: /itops/* (configurable)
Least Privilege: Yes
Operations:
✓ Create users
✓ Update user attributes
✓ Reset credentials
✓ Manage group membership
✗ Create roles
✗ Modify role policies
Summary
You have successfully:
✅ Created AWS IAM service account beaksvc-itops
✅ Created and attached custom IAM policy
✅ Generated API access keys
✅ Enabled CloudTrail audit logging
✅ Validated setup with 5 tests
✅ Documented credentials for handoff
Beak ITOps agent is ready to begin automated AWS IAM user management!