aws ssm create-association-batch
Associates the specified Amazon Web Services Systems Manager document (SSM document) with the specified managed nodes or targets. AWS CLI reference
1 example 2 options Its page in the AWS CLI reference
Examples
To create multiple associations
The following create-association-batch example associates a configuration document with multiple instances. The output returns a list of successful and failed operations, if applicable.
aws ssm create-association-batch --entries "Name=AWS-UpdateSSMAgent,InstanceId=i-1234567890abcdef0" "Name=AWS-UpdateSSMAgent,InstanceId=i-9876543210abcdef0"Identify--entriesOne or more associations.Its output, shortened
{
"Successful": [
{
"Name": "AWS-UpdateSSMAgent",
"InstanceId": "i-1234567890abcdef0",
"AssociationVersion": "1",
"Date": 1550504725.007,
"LastUpdateAssociationDate": 1550504725.007,
"Status": {
"Date": 1550504725.007,
"Name": "Associated",
"Message": "Associated with AWS-UpdateSSMAgent"
},
"Overview": {
"Status": "Pending",
"DetailedStatus": "Creating"
},
"DocumentVersion": "$DEFAULT",
"AssociationId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
"Targets": [
{
"Key": "InstanceIds",
"Values": [
"i-1234567890abcdef0"
]
}
]
},
{
"Name": "AWS-UpdateSSMAgent",
… 27 more linesFor more information, see Creating associations in the AWS Systems Manager User Guide.
Options
--association-dispatch-assume-roleA role used by association to take actions on your behalf.--entriesOne or more associations.