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:
The EC2 Instance does not have the 'AWS CLI' installed or is running an old Version of the 'AWS CLI'
The EC2 Instance does not have the 'AWS Tools for PowerShell' installed or is running an old Version of the 'AWS Tools for PowerShell'
The EC2 Instance does not have the 'AWS SSM Agent' installed or is running an old Version of the 'AWS SSM Agent'
The Ec2Launch folder structure missing on the EC2 Instance
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:
To check the Version of 'AWS CLI' you can run the command: aws --version
To check the Version of 'AWS Tools for PowerShell' you can run the command: Get-AWSPowerShellVersion
To check the Version of 'AWS SSM Agent' you can run the following command in PowerShell: Get-Service AmazonSSMAgent
More information on the link below:
To check the EC2Launch Version you can run the command: & "C:\Program Files\Amazon\EC2Launch\EC2Launch.exe" version
More Information on the link below:
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