{
  "title": "1. Create IAM role and instance profile",
  "content": "aws iam create-role --role-name EC2-Bedrock-Access \\\n  --assume-role-policy-document '{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [{\n      \"Effect\": \"Allow\",\n      \"Principal\": {\"Service\": \"ec2.amazonaws.com\"},\n      \"Action\": \"sts:AssumeRole\"\n    }]\n  }'\n\naws iam attach-role-policy --role-name EC2-Bedrock-Access \\\n  --policy-arn arn:aws:iam::aws:policy/AmazonBedrockFullAccess\n\naws iam create-instance-profile --instance-profile-name EC2-Bedrock-Access\naws iam add-role-to-instance-profile \\\n  --instance-profile-name EC2-Bedrock-Access \\\n  --role-name EC2-Bedrock-Access",
  "code_samples": [],
  "headings": [],
  "url": "llms-txt#1.-create-iam-role-and-instance-profile",
  "links": []
}