Cookie の設定を選択する

当社は、当社のサイトおよびサービスを提供するために必要な必須 Cookie および類似のツールを使用しています。当社は、パフォーマンス Cookie を使用して匿名の統計情報を収集することで、お客様が当社のサイトをどのように利用しているかを把握し、改善に役立てています。必須 Cookie は無効化できませんが、[カスタマイズ] または [拒否] をクリックしてパフォーマンス Cookie を拒否することはできます。

お客様が同意した場合、AWS および承認された第三者は、Cookie を使用して便利なサイト機能を提供したり、お客様の選択を記憶したり、関連する広告を含む関連コンテンツを表示したりします。すべての必須ではない Cookie を受け入れるか拒否するには、[受け入れる] または [拒否] をクリックしてください。より詳細な選択を行うには、[カスタマイズ] をクリックしてください。

AWS::IAM::InstanceProfile

フォーカスモード
AWS::IAM::InstanceProfile - AWS CloudFormation
このページはお客様の言語に翻訳されていません。 翻訳のリクエスト
フィルタビュー

Creates a new instance profile. For information about instance profiles, see Using instance profiles.

For information about the number of instance profiles you can create, see IAM object quotas in the IAM User Guide.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::IAM::InstanceProfile", "Properties" : { "InstanceProfileName" : String, "Path" : String, "Roles" : [ String, ... ] } }

YAML

Type: AWS::IAM::InstanceProfile Properties: InstanceProfileName: String Path: String Roles: - String

Properties

InstanceProfileName

The name of the instance profile to create.

This parameter allows (through its regex pattern) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-

Required: No

Type: String

Pattern: [\w+=,.@-]+

Minimum: 1

Maximum: 128

Update requires: Replacement

Path

The path to the instance profile. For more information about paths, see IAM Identifiers in the IAM User Guide.

This parameter is optional. If it is not included, it defaults to a slash (/).

This parameter allows (through its regex pattern) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (\u0021) through the DEL character (\u007F), including most punctuation characters, digits, and upper and lowercased letters.

Required: No

Type: String

Pattern: (\u002F)|(\u002F[\u0021-\u007E]+\u002F)

Minimum: 1

Maximum: 512

Update requires: Replacement

Roles

The name of the role to associate with the instance profile. Only one role can be assigned to an EC2 instance at a time, and all applications on the instance share the same role and permissions.

Required: Yes

Type: Array of String

Update requires: No interruption

Return values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the resource name. For example:

{ "Ref": "MyProfile" }

For the AWS::IAM::InstanceProfile resource with the logical ID MyProfile, Ref returns the name of the instance profile.

For more information about using the Ref function, see Ref.

Fn::GetAtt

The Fn::GetAtt intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.

Arn

Returns the Amazon Resource Name (ARN) for the instance profile. For example:

{"Fn::GetAtt" : ["MyProfile", "Arn"] }

This returns a value such as arn:aws:iam::1234567890:instance-profile/MyProfile-ASDNSDLKJ.

Examples

IAM Instance Profile

In this example, the InstanceProfile resource refers to the role by specifying its name, "MyRole".

JSON

{ "AWSTemplateFormatVersion": "2010-09-09", "Resources": { "MyInstanceProfile": { "Type": "AWS::IAM::InstanceProfile", "Properties": { "Path": "/", "Roles": [ { "Ref": "MyRole" } ] } } } }

YAML

AWSTemplateFormatVersion: "2010-09-09" Resources: MyInstanceProfile: Type: "AWS::IAM::InstanceProfile" Properties: Path: "/" Roles: - Ref: "MyRole"

See also

このページの内容

プライバシーサイト規約Cookie の設定
© 2025, Amazon Web Services, Inc. or its affiliates.All rights reserved.