aws-toolkit-azure-devops
aws-toolkit-azure-devops copied to clipboard
Credentials are not working in inline powershell script
Hi, I added the "AWS Tools for Windows PowerShell Script" task to my Azure DevOps pipeline, then I added my valid AWS credentials using AWS Service Connection (input AccessKeyID and SecretAccessKey in popup window), then choose "Inline Script" option and input my powershell script: New-CFInvalidation -DistributionId 'XXXXX' -Paths_Item ' /*'
When I trigger my pipeline I got the following error: New-CFInvalidation : No credentials specified or obtained from persisted/shell defaults. At C:\agent_work_temp\e6ffb344-ff94-47e4-b5b8-2d5801faab61.ps1:5 char:11
$result = New-CFInvalidation -DistributionId 'XXXX' -Paths_Item ' /*
- CategoryInfo : InvalidOperation: (Amazon.PowerShe...alidationCmdlet:NewCFInvalidationCmdlet) [New-CFInv
alidation], InvalidOperationException
- FullyQualifiedErrorId : InvalidOperationException,Amazon.PowerShell.Cmdlets.CF.NewCFInvalidationCmdlet
The AWS Service Connection works if I use it for "AWS CLI" task in my pipeline.
Regards, Alexander
HI @fivanec , can you tell us these things: Your Environment
- VSTS or Azure Devops (on-prem or cloud based?):
- VSTS or Azure Devops version:
- AWS VSTS Tools version: