setting-up-ec2-instance-profiles

द्वारा aws

EC2 इंस्टेंस को IAM भूमिकाएँ इंस्टेंस प्रोफाइल के माध्यम से बनाकर और जोड़कर AWS सेवाओं को सुरक्षित रूप से कॉल करने के लिए कॉन्फ़िगर करता है, हार्डकोडेड क्रेडेंशियल्स को समाप्त करता है। तब उपयोग करें जब…

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.

aws की और Skills

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
एक Claude Code सत्र से कई AgentSpaces में AWS DevOps Agent का समन्वय करें — प्रश्नों को सही स्थान (prod बनाम staging बनाम knowledge) पर भेजें,…
aws-security
aws
AWS सुरक्षा सेवाओं और वर्कफ़्लो को कवर करता है — Security Hub V2 (OCSF) findings, connectors, aggregators, automation rules, और security posture summaries;…
querying-aws-sagemaker-catalog
aws
SageMaker Catalog एसेट मेटाडेटा टेबल्स पर SQL एनालिटिक्स चलाता है जिन्हें S3 Tables में Apache Iceberg के रूप में निर्यात किया गया है। इसमें गवर्नेंस क्वेरी, एसेट ग्रोथ ट्रैकिंग शामिल है…
agents-connect
aws
अपने एजेंट को Gateway के माध्यम से बाहरी APIs, टूल्स, या सेवाओं से जोड़ते समय, या Cedar नीतियों के साथ टूल एक्सेस प्रतिबंधित करते समय उपयोग करें। Gateway सेटअप, लक्ष्य…
aurora-dsql
aws
Aurora DSQL क्लस्टरों की प्रावधानिंग और प्रबंधन करता है, psql या DSQL कनेक्टर्स के माध्यम से जुड़ता है, स्कीमा प्रबंधित करता है, क्वेरी चलाता है, MySQL से माइग्रेट करता है, क्वेरी योजनाओं का निदान करता है,…
transitgateway
aws
AWS Transit Gateway कॉन्फ़िगर करता है: एक हब बनाना और VPCs को जोड़ना, रूट टेबल के साथ ट्रैफ़िक को विभाजित करना, एक हब के माध्यम से ईग्रेस और इंस्पेक्शन को केंद्रीकृत करना…