I have created a Step Template using PowerShell taking a parameter of type AWS Account.
Within the script I was expecting to be able to dereference the SecretKey & AccessKey appropriately, as per the documentation.
My variable name is $aAWSAccount. I believe the following code in my Step Template should therefore work:
Write-Host ‘AWSAccount.Id=’ $aAWSAccount
Write-Host ‘AWSAccount.AccessKey=’ $aAWSAccount.AccessKey
When I use the Step in a Process for one of my projects, I am correctly prompted to choose a variable from my Project of type AWS Account.
When the deployment of that project runs, the first line of output gives me the name of the AWS Account that is passed as a parameter, as I expect.
However $aAWSAccount.AccessKey is null.
Is there a difference between how AWS Account variables are accessible in a regular step as opposed to as a parameter in a Step Template?
Any other advice please? This is frustrating me.