Bootstrap FreeKB - Amazon Web Services (AWS) - Create an Instance Profile using the AWS CLI
Amazon Web Services (AWS) - Create an Instance Profile using the AWS CLI


This assumes you have already configured the aws command line tool. If not, check out my article on Getting Started with the AWS CLI.

An instance profile is an Identity and Access Management (IAM) feature. You associate an instance profile with an IAM role, and the IAM role will have a policy that allows or denies access to certain resources, such as S3. Then you attach the instance profile to an EC2 instance to allow or deny the instance access to certain resources, such as S3.

The aws iam create-instance-profile command can be used to create an instance profile.

~]$ aws iam create-instance-profile --instance-profile-name my-instance-profile
{
    "InstanceProfile": {
        "Path": "/",
        "InstanceProfileName": "my-instance-profile",
        "InstanceProfileId": "AIPA2MITL76GNDM4CZFIM",
        "Arn": "arn:aws:iam::123456789012:instance-profile/my-instance-profile",
        "CreateDate": "2024-01-26T02:20:03+00:00",
        "Roles": []
    }
}

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 85a247 in the box below so that we can be sure you are a human.