aws / aws-tools-for-powershell

The AWS Tools for PowerShell lets developers and administrators manage their AWS services from the PowerShell scripting environment.
Apache License 2.0
235 stars 77 forks source link

Push-RSDBatchStatement - FATAL: user "IAM:dbUser" does not exist #269

Closed dburtsev closed 2 years ago

dburtsev commented 2 years ago

Describe the bug

Push-RSDBatchStatement fail

Expected Behavior

Push-RSDBatchStatement execute query

Current Behavior

Send-RSDStatement works Push-RSDBatchStatemen fail

Reproduction Steps

`$QueryId = Send-RSDStatement -ClusterIdentifier $ClusterId -Database $Database -Sql $sql -StatementName 'ExecuteScalar' -AccessKey $AccessKey -SecretKey $SecretKey -SessionToken $SessionToken -DbUser $superUser -Region 'us-east-1' . . . $resp = Push-RSDBatchStatement -ClusterIdentifier $ClusterId -Database $Database -DbUser $superUser -Sql $sql -StatementName 'abc' -AccessKey $AccessKey -SecretKey $SecretKey -SessionToken $SessionToken -Region 'us-east-1' Start-Sleep -Seconds 1 $QueryId = $resp.Id [Amazon.RedshiftDataAPIService.Model.DescribeStatementResponse]$sqlResp = Get-RSDStatement -Id $QueryId -AccessKey $AccessKey -SecretKey $SecretKey -SessionToken $SessionToken

while ($sqlResp.Status.Value -notin ('ABORTED', 'FAILED', 'FINISHED')) { $sqlResp.Status.Value Start-Sleep -Seconds 2
$sqlResp = Get-RSDStatement -Id $QueryId -AccessKey $AccessKey -SecretKey $AccessKey -SessionToken $SessionToken }

if ($sqlResp.Status.Value -ne 'FINISHED') {
Write-Error $sqlResp.Error }
}
FATAL: user "IAM:dbUser" does not exist`

Possible Solution

No response

Additional Information/Context

No response

AWS Tools for PowerShell version used

latest

PowerShell version used

Name Value


PSVersion 7.2.4 PSEdition Core GitCommitId 7.2.4 OS Microsoft Windows 10.0.19042 Platform Win32NT PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…} PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 WSManStackVersion 3.0

Operating System and version

Windows 10

github-actions[bot] commented 2 years ago

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.