This is the new Amazon CloudFormation Template Reference Guide. Please update your bookmarks and links. For help getting started with CloudFormation, see the Amazon CloudFormation User Guide.
AWS::SSM::DefaultHostManagementConfiguration
The AWS::SSM::DefaultHostManagementConfiguration resource turns on Default Host Management Configuration for an Amazon Web Services account and Amazon Web Services Region. With Default Host Management Configuration, Amazon Systems Manager manages your Amazon EC2 instances using an IAM role that you register for the account, without an instance profile on each instance.
Default Host Management Configuration is a single setting for each account and Region, so you can create at most one AWS::SSM::DefaultHostManagementConfiguration resource for each account and Region. Creating the resource fails if Default Host Management Configuration is already turned on. Deleting the resource turns off Default Host Management Configuration.
Syntax
To declare this entity in your Amazon CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::SSM::DefaultHostManagementConfiguration", "Properties" : { "CustomerManagedRoleArn" :String, "PermissionModel" :String} }
YAML
Type: AWS::SSM::DefaultHostManagementConfiguration Properties: CustomerManagedRoleArn:StringPermissionModel:String
Properties
CustomerManagedRoleArn-
The ARN of the IAM role to use for Default Host Management Configuration. The role must trust
ssm.amazonaws.com.Required when
PermissionModelisSELF_MANAGED. Don't specify this property whenPermissionModelisSERVICE_MANAGED. IfPermissionModelisSELF_MANAGEDand you omit this property, the stack operation fails.Required: No
Type: String
Pattern:
^arn:(aws|aws-cn|aws-us-gov):iam::\d{12}:role/[\w+=,.@/-]+$Minimum:
20Maximum:
2048Update requires: No interruption
PermissionModel-
Specifies whether Systems Manager or you manage the IAM role that Default Host Management Configuration uses.
-
SERVICE_MANAGED– Systems Manager creates and manages the IAM roleAWSReservedSSM_DefaultHostManagement_for you.region -
SELF_MANAGED– Systems Manager uses the IAM role that you specify inCustomerManagedRoleArn.
Required: Yes
Type: String
Allowed values:
SERVICE_MANAGED | SELF_MANAGEDUpdate requires: No interruption
-
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the ID of the Default Host Management Configuration service setting, which is always /ssm/managed-instance/default-ec2-instance-management-role.
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.
LastModifiedDate-
The date and time that the service setting was last modified.
LastModifiedUser-
The ARN of the principal that last modified the service setting.
RoleArn-
The ARN of the IAM role that Default Host Management Configuration uses. For
SERVICE_MANAGED, this is the role that Systems Manager creates, for example:arn:aws:iam::111122223333:role/aws-reserved/ssm.amazonaws.com/AWSReservedSSM_DefaultHostManagement_us-east-1. ForSELF_MANAGED, this is the role that you specify inCustomerManagedRoleArn. SettingArn-
The ARN of the Default Host Management Configuration service setting. For example:
arn:aws:ssm:us-east-1:111122223333:servicesetting/ssm/managed-instance/default-ec2-instance-management-role. SettingId-
The ID of the Default Host Management Configuration service setting:
/ssm/managed-instance/default-ec2-instance-management-role. Status-
The status of the service setting.
Customizedmeans Default Host Management Configuration is turned on.Defaultmeans it's turned off.
Examples
Use a service-managed role for Default Host Management Configuration
The following example turns on Default Host Management Configuration and lets Systems Manager create and manage the IAM role.
JSON
{ "Type": "AWS::SSM::DefaultHostManagementConfiguration", "Properties": { "PermissionModel": "SERVICE_MANAGED" } }
YAML
Type: AWS::SSM::DefaultHostManagementConfiguration Properties: PermissionModel: SERVICE_MANAGED
Use your own role for Default Host Management Configuration
The following example turns on Default Host Management Configuration using an IAM role that you manage.
JSON
{ "Type": "AWS::SSM::DefaultHostManagementConfiguration", "Properties": { "PermissionModel": "SELF_MANAGED", "CustomerManagedRoleArn": "arn:aws:iam::111122223333:role/MyDefaultHostManagementRole" } }
YAML
Type: AWS::SSM::DefaultHostManagementConfiguration Properties: PermissionModel: SELF_MANAGED CustomerManagedRoleArn: arn:aws:iam::111122223333:role/MyDefaultHostManagementRole