
Setting Up Ec2 Instance Profiles
Handles the full workflow of getting EC2 instances to authenticate with AWS services using IAM roles instead of hardcoded credentials. You create or reuse a role with the right policies, attach it via an instance profile, and verify everything works. The skill includes a step-by-step procedure and troubleshooting for common issues like credential propagation delays and replacing existing profiles. Useful when you're setting up instances that need to talk to S3, DynamoDB, or other AWS services without embedding access keys in your code or config files.
- skills.sh installs
- 6.6K
- GitHub stars
- 3.4K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add aws/agent-toolkit-for-aws --skill setting-up-ec2-instance-profiles --agent claude-codeInstalls into .claude/skills of the current project.
Files
Setting Up EC2 Instance Profiles
Overview
Domain expertise for granting EC2 instances secure access to AWS services using IAM roles and instance profiles. Covers the full lifecycle: identifying required permissions, creating or reusing IAM roles with least-privilege policies, creating instance profiles, attaching them to EC2 instances, and verifying credential availability.
Configure an EC2 instance profile
To set up an IAM role and instance profile for an EC2 instance, follow the procedure exactly. See EC2 instance profile setup procedure.
Troubleshooting
Instance not found
Verify the instance ID and region are correct. List instances with aws ec2 describe-instances --region <region>.
Instance already has a profile
The procedure handles replacement — it will prompt before disassociating the existing profile.
Credentials not available after attachment
Instance profile propagation can take 30–60 seconds. Applications may need a restart to pick up new credentials.
Access denied errors
Sponsors
Details
- Repository
- github.com/aws/agent-toolkit-for-aws
- Categories
- AI & Agent Building, Cloud & Infrastructure, Databases
- First seen
- Jun 3, 2026
More from aws/agent-toolkit-for-aws
All 56- Creating Production Vpc Multi Az6.6K
- Signing In To Aws6.6K
- Aws Transform6.5K
- Connecting Vpcs With Peering6.5K
- Enabling Lambda Vpc Internet Access6.5K
- Exporting Rds To S36.5K
- Setting Up Cloudtrail Multi Region6.5K
- Routing Traffic With Route53 And Cloudfront6.5K
- Creating Amazon Aurora Db Cluster With Instances6.4K
- Troubleshooting Efs6.3K
- Aws Lambda Durable Functions6.2K
- Aws Lambda Managed Instances6.2K
- Aws Cleanrooms6.1K
- Aws Lambda Microvms6.1K
- Amazon Aurora Postgresql6K
- Querying Aws S36K
- Amazon Opensearch Service6K
- Aws Blocks5.9K
- Querying Aws Cloudwatch5.9K
- Amazon Elasticache5.9K
- Amazon Aurora Mysql5.7K
- Managing Amazon Msk5.5K
- Developing Applications On Managed Service For Apache Flink5.4K
- Creating Ec2 Image Builder Pipeline3.9K