-
Notifications
You must be signed in to change notification settings - Fork 94
Description
Describe the bug
I have AWS.Tools 5.0.17 installed on Windows computer
this script:
Import-Module -Name AWS.Tools.EC2
$tag = New-Object Amazon.EC2.Model.Tag
$tag.Key = "Name"
$tag.Value = "MyEC2Instance"
$tagSpec = New-Object Amazon.EC2.Model.TagSpecification
$tagSpec.ResourceType = "instance"
$tagSpec.Tags.Add($tag)
ends with an error:
InvalidOperation: You cannot call a method on a null-valued expression.
In version 4.1.xxx it works fine.
Regression Issue
- Select this option if this issue appears to be a regression.
Expected Behavior
Create a TAG specificatio
Current Behavior
InvalidOperation: You cannot call a method on a null-valued expression
Reproduction Steps
Import-Module -Name AWS.Tools.EC2
$tag = New-Object Amazon.EC2.Model.Tag
$tag.Key = "Name"
$tag.Value = "MyEC2Instance"
$tagSpec = New-Object Amazon.EC2.Model.TagSpecification
$tagSpec.ResourceType = "instance"
$tagSpec.Tags.Add($tag)
Possible Solution
No response
Additional Information/Context
No response
AWS Tools for PowerShell version used
5.0.17
PowerShell version used
the same issue for 5.1 and 7.5.2
Operating System and version
Windows Server 2022