IAM Permission Errors
IAM Permission Errors
This page helps you diagnose and resolve AWS IAM permission issues.
Understanding IAM Errors
When SkySaver can’t perform an action due to permissions, you’ll see errors like:
AccessDenied: User: arn:aws:sts::123456789012:assumed-role/SkySaverScheduler/...
is not authorized to perform: ec2:StopInstancesCommon Permission Issues
Role Assumption Failed
Error:
Unable to assume role arn:aws:iam::123456789012:role/SkySaverSchedulerCauses:
- Role doesn’t exist
- External ID mismatch
- Trust policy incorrect
Solutions:
- Verify CloudFormation template was deployed
- Check External ID in Project Defaults matches role trust policy
- Verify trust policy allows SkySaver’s AWS account
EC2 Permission Denied
Error:
AccessDenied: ... is not authorized to perform: ec2:StartInstancesRequired Permissions:
- "ec2:StartInstances"
- "ec2:StopInstances"
- "ec2:DescribeInstances"
- "ec2:ModifyInstanceAttribute"Solution: Ensure your CloudFormation template includes these permissions.
RDS Permission Denied
Error:
AccessDenied: ... is not authorized to perform: rds:StopDBInstanceRequired Permissions:
- "rds:DescribeDBClusters"
- "rds:DescribeDBInstances"
- "rds:StopDBCluster"
- "rds:StopDBInstance"
- "rds:StartDBInstance"
- "rds:StartDBCluster"
- "rds:ModifyDBCluster"
- "rds:ModifyDBInstance"Lambda Permission Denied
Error:
AccessDenied: ... is not authorized to perform: lambda:PutFunctionConcurrencyRequired Permissions:
- "lambda:ListFunctions"
- "lambda:ListTags"
- "lambda:GetFunctionConcurrency"
- "lambda:GetProvisionedConcurrencyConfig"
- "lambda:ListVersionsByFunction"
- "lambda:PutFunctionConcurrency"
- "lambda:DeleteFunctionConcurrency"
- "lambda:ListProvisionedConcurrencyConfigs"
- "lambda:PutProvisionedConcurrencyConfig"ASG Permission Denied
Error:
AccessDenied: ... is not authorized to perform: autoscaling:UpdateAutoScalingGroupRequired Permissions:
- "autoscaling:DescribeAutoScalingGroups"
- "autoscaling:DescribeTags"
- "autoscaling:UpdateAutoScalingGroup"Cost Explorer Permission Denied
Error:
AccessDenied: ... is not authorized to perform: ce:GetCostAndUsageRequired Permissions:
- "ce:GetRightsizingRecommendation"
- "ce:GetCostAndUsage"
- "ce:GetSavingsPlansPurchaseRecommendation"
- "ce:GetReservationPurchaseRecommendation"S3 Permission Denied (CUR)
Error:
AccessDenied: ... is not authorized to perform: s3:GetObjectRequired Permissions:
- "s3:ListBucket"
- "s3:GetObject"
- "s3:GetBucketLocation"Diagnosing Permission Issues
Step 1: Check Automation Reports
- Navigate to Automation Reports
- Find the failed execution
- View the error message
- Note the specific action and resource
Step 2: Check AWS CloudTrail
- Open AWS CloudTrail in AWS Console
- Go to Event history
- Filter: Event source =
sts.amazonaws.com(for role assumption) - Or filter by specific service (ec2, rds, etc.)
- Look for
AccessDeniederror codes
Step 3: Verify IAM Role
- Open IAM in AWS Console
- Find the
SkySaverSchedulerrole - Review attached policies
- Compare with required permissions
Fixing Permission Issues
Option 1: Redeploy CloudFormation Template
The easiest fix is to redeploy the complete template:
- Delete the existing stack
- Deploy the updated template from AWS Account Setup
Option 2: Update Inline Policy
Add missing permissions to the existing role:
- Open IAM in AWS Console
- Find the
SkySaverSchedulerrole - Edit the inline policy
- Add missing permissions
- Save changes
External ID Issues
The External ID is a security measure to prevent confused deputy attacks.
Finding Your External ID
- Navigate to Project Defaults
- Find the External ID field
- Copy this value
Updating the IAM Role
The External ID must match in the role’s trust policy:
Condition:
StringEquals:
sts:ExternalId:
- "your-external-id-here"Role Trust Policy
The trust policy must allow SkySaver’s AWS account:
AssumeRolePolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: "Allow"
Principal:
AWS: "arn:aws:iam::975050237171:root"
Action:
- "sts:AssumeRole"
Condition:
StringEquals:
sts:ExternalId:
- "<Your External ID>"Service Control Policies (SCPs)
If you use AWS Organizations with SCPs:
- Verify SCPs don’t block required actions
- Check for regional restrictions
- Ensure SkySaver’s account isn’t blocked
Related Topics
- AWS Account Setup - CloudFormation template
- Common Issues - Other troubleshooting
- FAQ - Frequently asked questions