aws avatar

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-code

Installs 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
1assistant-ui avatartoolsassistant-ui/skillsRegisters LLM tools and renders custom tool-call UI in assistant-ui (@assistant-ui/react). Covers the current authoring model: a "use generative" file exporting6.5Kskills.sh installs
2assistant-ui avatarsetupassistant-ui/skillsInstalls and configures assistant-ui in a project via the CLI, and picks the right runtime for a backend. Use for first-time install, scaffold, or config: `npx 6.3Kskills.sh installs
3conardli avatargpt-image-2conardli/garden-skills面向 GPT Image 2 的图像生成 / 编辑技能。可在 3 种环境下使用:(A) Garden 本地模式,通过 OpenAI 兼容接口直接出图并落盘;(B) Host-Native 模式,把本 Skill 当作提示词工程指引,把渲染好的 prompt 交给宿主 Agent 自带的图像工具出图;(C) Adviso6.2Kskills.sh installs
4assistant-ui avatarupdateassistant-ui/skillsUpgrades an existing assistant-ui project to current releases and executes the resulting migrations. Use when the user wants to update, upgrade, bump, or migrat6Kskills.sh installs
5aws avataramazon-aurora-postgresqlaws/agent-toolkit-for-awsAmazon Aurora PostgreSQL — creates, modifies, and advises on Aurora PostgreSQL clusters specifically (PostgreSQL-compatible engine, Aurora serverless, express c6Kskills.sh installs
6aws avatarquerying-aws-s3aws/agent-toolkit-for-awsQueries S3 object metadata, tracks bucket activity, audits object changes, searches annotations, and analyzes storage metrics using S3 Metadata system tables (j6Kskills.sh installs