Update VSS components on your instances on a schedule - Amazon Elastic Compute Cloud

Update VSS components on your instances on a schedule

We recommend that you keep the VSS components updated with the latest recommended version. There are several different ways that you can update components when a new version of the AwsVssComponents package is released.

Update methods
  • You can repeat the steps described in Manually install VSS components on an instance when a new version of the AWS VSS components is released.

  • You can configure a Systems Manager State Manager association to automatically download and install new or updated VSS components when the AwsVssComponents package becomes available.

  • You can automatically install or update the AwsVssComponents package whenever you create application-consistent snapshots, when you use Systems Manager to run the AWSEC2-VssInstallAndSnapshot document.

Note

We recommend that you use Systems Manager to run the AWSEC2-VssInstallAndSnapshot command document, which automatically installs or updates the AwsVssComponents package before it creates the application-consistent snapshots. For more information, see Run the AWSEC2-VssInstallAndSnapshot command document (recommended).

To create a Systems Manager State Manager association, follow the steps for your preferred environment.

Console
To create a State Manager association using the console
  1. Open the AWS Systems Manager console at https://console.aws.amazon.com/systems-manager/.

  2. In the navigation pane, choose State Manager.

    Or, if the Systems Manager homepage opens first, open the navigation pane and then choose State Manager.

  3. Choose Create association.

  4. In the Name field, enter a descriptive name.

  5. In the Document list, choose AWS-ConfigureAWSPackage.

  6. In the Parameters section, choose Install from the Action list.

  7. For Installation type, choose Uninstall and reinstall.

  8. In the Name field, enter AwsVssComponents. You can keep the Version and Additional Arguments fields empty.

  9. In the Targets section, choose an option.

    Note

    If you choose to target instances by using tags, and you specify tags that map to Linux instances, the association succeeds on the Windows instance but fails on the Linux instances. The overall status of the association shows Failed.

  10. In the Specify schedule section, choose an option.

  11. In the Advanced options section, for Compliance severity, choose a severity level for the association. For more information, see About State Manager association compliance. For Change Calendars, select a preconfigured change calendar. For more information, see about AWS Systems Manager Change Calendar.

  12. For Rate control, do the following:

    • For Concurrency, specify either a number or a percentage of managed nodes on which to run the command at the same time.

    • For Error threshold, specify when to stop running the command on other managed nodes after it fails on either a number or a percentage of nodes.

  13. (Optional) For Output options, to save the command output to a file, select Enable writing output to S3. Enter the bucket and prefix (folder) names in the boxes.

  14. Choose Create association, and then choose Close. The system attempts to create the association on the instances and immediately apply the state.

    Note

    If EC2 instances for Windows Server show a status of Failed, verify that the SSM Agent is running on the instance, and verify that the instance is configured with an AWS Identity and Access Management (IAM) role for Systems Manager. For more information, see Setting up AWS Systems Manager.

AWS CLI

You can run create-association AWS CLI command to update a Distributor package on a schedule without taking the associated application offline. Only new or updated files in the package are replaced.

To create a State Manager association using the AWS CLI
  1. Install and configure the AWS CLI, if you haven't already. For information, see Install or update the latest version of the AWS CLI.

  2. Run the following command to create an association. The value of --name, the document name, is always AWS-ConfigureAWSPackage. The following command uses the key InstanceIds to specify target instances.

    aws ssm create-association \ --name "AWS-ConfigureAWSPackage" \ --parameters '{"action":["Install"],"installationType":["Uninstall and reinstall"],"name":["AwsVssComponents"]}' \ --targets [{\"Key\":\"InstanceIds\",\"Values\":[\"i-01234567890abcdef\",\"i-000011112222abcde\"]}]

For information about other options you can use with the create-association command, see create-association in the AWS Systems Manager section of the AWS CLI Command Reference.