aws-cdk-lib.aws_ec2.CfnLaunchTemplate.IamInstanceProfileProperty

interface IamInstanceProfileProperty

LanguageType name
.NETAmazon.CDK.AWS.EC2.CfnLaunchTemplate.IamInstanceProfileProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsec2#CfnLaunchTemplate_IamInstanceProfileProperty
Javasoftware.amazon.awscdk.services.ec2.CfnLaunchTemplate.IamInstanceProfileProperty
Pythonaws_cdk.aws_ec2.CfnLaunchTemplate.IamInstanceProfileProperty
TypeScript aws-cdk-lib » aws_ec2 » CfnLaunchTemplate » IamInstanceProfileProperty

Specifies an IAM instance profile, which is a container for an IAM role for your instance.

You can use an IAM role to distribute your AWS credentials to your instances.

If you are creating the launch template for use with an Amazon EC2 Auto Scaling group, you can specify either the name or the ARN of the instance profile, but not both.

IamInstanceProfile is a property of AWS::EC2::LaunchTemplate LaunchTemplateData .

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
const iamInstanceProfileProperty: ec2.CfnLaunchTemplate.IamInstanceProfileProperty = {
  arn: 'arn',
  name: 'name',
};

Properties

NameTypeDescription
arn?stringThe Amazon Resource Name (ARN) of the instance profile.
name?stringThe name of the instance profile.

arn?

Type: string (optional)

The Amazon Resource Name (ARN) of the instance profile.


name?

Type: string (optional)

The name of the instance profile.