Skip to main content
All CollectionsKnowledge BaseAWS WorkloadsTroubleshooting - AWS Workloads
EC2 backups with VSS enabled fail in CloudRanger with the Error 'You cannot call a method on a null-valued expression At C:\ProgramData\Amazon\SSM\InstanceData\...\document\orchestration\...\awsrunPowerShellScript\0.awsrunPowerShellScript script.ps1'
EC2 backups with VSS enabled fail in CloudRanger with the Error 'You cannot call a method on a null-valued expression At C:\ProgramData\Amazon\SSM\InstanceData\...\document\orchestration\...\awsrunPowerShellScript\0.awsrunPowerShellScript script.ps1'
Updated over 10 months ago

Problem description

EC2 backups with VSS enabled fail in CloudRanger with the Error:
'You cannot call a method on a null-valued expression At C:\ProgramData\Amazon\SSM\InstanceData\...\document\orchestration\...\awsrunPowerShellScript\0.awsrunPowerShellScript_script.ps1'

Cause

The reason for this failure is that one or more AWS components on your EC2 instance(s) is (are) out of date.

This problem is usually due to at least one of the following reasons:

  1. The EC2 Instance does not have the 'AWS CLI' installed or is running an old Version of the 'AWS CLI'

  2. The EC2 Instance does not have the 'AWS Tools for PowerShell' installed or is running an old Version of the 'AWS Tools for PowerShell'

  3. The EC2 Instance does not have the 'AWS SSM Agent' installed or is running an old Version of the 'AWS SSM Agent'

  4. The Ec2Launch folder structure missing on the EC2 Instance

  5. The EC2 Instance does not have an updated Version of the EC2Config

Traceback

Verification

To Verify if the AWS components are installed and up to date on the EC2 instance we recommend you to follow the steps below:

  1. To check the Version of 'AWS CLI' you can run the command: aws --version

  2. To check the Version of 'AWS Tools for PowerShell' you can run the command: Get-AWSPowerShellVersion

  3. To check the Version of 'AWS SSM Agent' you can run the following command in PowerShell: Get-Service AmazonSSMAgent

  4. More information on the link below:

  5. To check the EC2Launch Version you can run the command: & "C:\Program Files\Amazon\EC2Launch\EC2Launch.exe" version

  6. More Information on the link below:

  7. To check the Version of the EC2Config go to 'Programs and Features' in Windows and check the Version of the Program 'Ec2ConfigService'.

Resolution

To resolve this issue you need to install / upgrade all the AWS components on your EC2 instances(s).

1. Upgrade the 'AWS CLI':
*AWS CLI:
msiexec.exe /i https://awscli.amazonaws.com/AWSCLIV2.msi

2. Upgrade the 'AWS Tools for PowerShell':
*AWS Tools for PowerShell:
Install-Module -Name AWSPowerShell
https://sdk-for-net.amazonwebservice...dSDKForNet.msi

3. Upgrade the 'AWS SSM Agent'
*AWS SSM Agent:
https://docs.aws.amazon.com/systems-...ted-agent.html

4. Install the latest version of EC2Launch on your EC2 Instance.
You can find a step by step guide on how to Install the latest version of EC2Launch on the Amazon link below:
https://docs.aws.amazon.com/AWSEC2/l...-download.html

5. Install the latest version of EC2Config
https://docs.aws.amazon.com/AWSEC2/l...g_Install.html

Did this answer your question?