Description
Describe the bug
GET-EC2TAG v 4.1.323 cmdlet does not honor ErrorAction parameter.
While writing an ebextension that calls Get-EC2Tag, it was deemed desirable to not write the error output to the logs as its not a problem if it cannot get the tags.
We tried making use of the ErrorAction cmdlet property and it does not suppress the error message.
Per the docs: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_commonparameters?view=powershell-7.3
It should suppress error messages when using Ignore.
Expected Behavior
Errors in Get-EC2Tag cmdlet should suppress error messages based on the ErrorAction variable.
Current Behavior
Errors in Get-EC2Tag cmdlet does not suppress error messages based on the ErrorAction variable.
Reproduction Steps
Call Get-EC2Tag in such a way that it produces an error (lack of authorization is our current example)
Error should be printed to console
Call Get-EC2Tag in the same way, but with -ErrorAction Ignore
Observe output
Possible Solution
Make the Get-EC2Tag cmdlet supress error messages based on ErrorAction cmdlet parameter
Additional Information/Context
No response
AWS Tools for PowerShell version used
4.1.323
PowerShell version used
5.1.17763
Operating System and version
Windows 2019 DataCenter