# AWS::SSM::Association The AWS::SSM::Association resource associates an SSM document in AWS Systems Manager with EC2 instances that contain a configuration agent to process the document. ## Syntax To declare this entity in your AWS CloudFormation template, use the following syntax: ### JSON
{ "Type" : "AWS::SSM::Association", "Properties" : { "AssociationName" : String, "DocumentVersion" : String, "InstanceId" : String, "Name" : String, "Parameters" : Parameters, "ScheduleExpression" : String, "Targets" : [ Target, ... ], "OutputLocation" : InstanceAssociationOutputLocation, "AutomationTargetParameterName" : String, "MaxErrors" : String, "MaxConcurrency" : String, "ComplianceSeverity" : String, "SyncCompliance" : String, "WaitForSuccessTimeoutSeconds" : Integer, "ApplyOnlyAtCronInterval" : Boolean, "CalendarNames" : [ String, ... ], "ScheduleOffset" : Integer } }### YAML
Type: AWS::SSM::Association Properties: AssociationName: String DocumentVersion: String InstanceId: String Name: String Parameters: Parameters ScheduleExpression: String Targets: - Target OutputLocation: InstanceAssociationOutputLocation AutomationTargetParameterName: String MaxErrors: String MaxConcurrency: String ComplianceSeverity: String SyncCompliance: String WaitForSuccessTimeoutSeconds: Integer ApplyOnlyAtCronInterval: Boolean CalendarNames: - String ScheduleOffset: Integer## Properties #### AssociationName The name of the association. _Required_: No _Type_: String _Pattern_:
^[a-zA-Z0-9_\-.]{3,128}$
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
#### DocumentVersion
The version of the SSM document to associate with the target.
_Required_: No
_Type_: String
_Pattern_: ([$]LATEST|[$]DEFAULT|^[1-9][0-9]*$)
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
#### InstanceId
The ID of the instance that the SSM document is associated with.
_Required_: No
_Type_: String
_Pattern_: (^i-(\w{8}|\w{17})$)|(^mi-\w{17}$)
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
#### Name
The name of the SSM document.
_Required_: Yes
_Type_: String
_Pattern_: ^[a-zA-Z0-9_\-.:/]{3,200}$
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
#### Parameters
Parameter values that the SSM document uses at runtime.
_Required_: No
_Type_: Parameters
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
#### ScheduleExpression
A Cron or Rate expression that specifies when the association is applied to the target.
_Required_: No
_Type_: String
_Minimum_: 1
_Maximum_: 256
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
#### Targets
The targets that the SSM document sends commands to.
_Required_: No
_Type_: List of Target
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
#### OutputLocation
_Required_: No
_Type_: InstanceAssociationOutputLocation
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
#### AutomationTargetParameterName
_Required_: No
_Type_: String
_Minimum_: 1
_Maximum_: 50
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
#### MaxErrors
_Required_: No
_Type_: String
_Pattern_: ^([1-9][0-9]{0,6}|[0]|[1-9][0-9]%|[0-9]%|100%)$
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
#### MaxConcurrency
_Required_: No
_Type_: String
_Pattern_: ^([1-9][0-9]{0,6}|[1-9][0-9]%|[1-9]%|100%)$
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
#### ComplianceSeverity
_Required_: No
_Type_: String
_Allowed Values_: CRITICAL
| HIGH
| MEDIUM
| LOW
| UNSPECIFIED
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
#### SyncCompliance
_Required_: No
_Type_: String
_Allowed Values_: AUTO
| MANUAL
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
#### WaitForSuccessTimeoutSeconds
_Required_: No
_Type_: Integer
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
#### ApplyOnlyAtCronInterval
_Required_: No
_Type_: Boolean
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
#### CalendarNames
_Required_: No
_Type_: List of String
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
#### ScheduleOffset
_Required_: No
_Type_: Integer
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
## Return Values
### Ref
When you pass the logical ID of this resource to the intrinsic `Ref` function, Ref returns the AssociationId.
### 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](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-getatt.html).
#### AssociationId
Unique identifier of the association.