setting-up-ec2-instance-profiles

от aws

Настраивает экземпляры EC2 для безопасного вызова сервисов AWS путем создания и прикрепления ролей IAM через профили экземпляров, исключая жестко заданные учетные данные. Используйте, когда…

npx skills add https://github.com/aws/agent-toolkit-for-aws --skill setting-up-ec2-instance-profiles

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

Check that the role's policies include the required actions and resource ARNs. Review CloudTrail logs for the specific denied action.

Application still uses hardcoded credentials

Remove credentials from config files, environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY), and ~/.aws/credentials. The SDK default credential chain will then use the instance profile.

Больше skills от aws

analyzing-release-readiness
aws
Запустить проверку готовности к релизу перед слиянием в GitHub PR, GitLab MR или локальной ветке. Использовать, когда пользователь хочет проанализировать изменения кода на предмет рисков, корректности,…
scanning-with-aws-security-agent
aws
Запустить сканирование AWS Security Agent в рабочей области — загружает исходный код в AWS, сканирует его с помощью управляемого сервиса Security Agent и возвращает ранжированные, проверенные…
coordinating-multi-space-devops-agent
aws
Координировать AWS DevOps Agent в нескольких AgentSpaces из одного сеанса Claude Code — направлять вопросы в нужное пространство (prod vs staging vs knowledge),…
aws-security
aws
Охватывает сервисы и рабочие процессы безопасности AWS — выводы Security Hub V2 (OCSF), коннекторы, агрегаторы, правила автоматизации и сводки по состоянию безопасности;…
querying-aws-sagemaker-catalog
aws
Выполняет SQL-аналитику по таблицам метаданных активов SageMaker Catalog, экспортированным как Apache Iceberg в S3 Tables. Охватывает запросы по управлению, отслеживание роста активов,…
agents-connect
aws
Используйте при подключении вашего агента к внешним API, инструментам или сервисам через Gateway, а также при ограничении доступа к инструментам с помощью политик Cedar. Обрабатывает настройку шлюза, целе…
aurora-dsql
aws
Обеспечивает и управляет кластерами Aurora DSQL, подключается через psql или DSQL Connectors, управляет схемами, выполняет запросы, мигрирует из MySQL, диагностирует планы запросов,…
transitgateway
aws
Настраивает AWS Transit Gateway: создание хаба и подключение VPC, сегментация трафика с помощью таблиц маршрутизации, централизация исходящего трафика и инспекции через хаб…