Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write-S3Object error if run through command prompt context #363

Closed
1 task
syroy opened this issue Nov 7, 2024 · 1 comment
Closed
1 task

Write-S3Object error if run through command prompt context #363

syroy opened this issue Nov 7, 2024 · 1 comment
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.

Comments

@syroy
Copy link

syroy commented Nov 7, 2024

Describe the bug

We have a powershell script that sends a file to an S3 bucket. If you run the powershell script from the powershell console or ISE, it runs fine. But if you attempt to run it from a command prompt it

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

Should run the same when powershell is invoked from a command prompt.

Current Behavior

Fails with (we used -verbose to get more details):

VERBOSE: Performing the operation "Write-S3Object (PutObject)" on target
"fully qualified bucket name".
VERBOSE: Invoking Amazon S3 object upload APIs in region 'ca-central-1'
C:\Path|PowershellScript.ps1 : There was problem writing to the S3 Bucket : The request signature we calculated
does not match the signature you provided. Check your key and signing method.
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,PowershellScript.ps1

Reproduction Steps

The command in the powershell script is
Write-S3Object -BucketName $BucketName -File $compressedFile -ProfileName default -Region ca-central-1 -Verbose

We use the following to excute the powershell script from a command prompt:
Powershell -File "C:\Path\PowershellScript.ps1"

Possible Solution

No response

Additional Information/Context

No response

AWS Tools for PowerShell version used

AWS Tools for PowerShell
Version 4.1.670

PowerShell version used

Name Value


PSVersion 5.1.20348.2652
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.20348.2652
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

Operating System and version

The host is a Windows Server:OS Name: Microsoft Windows Server 2022 Datacenter Azure Edition OS Version: 10.0.20348 N/A Build 20348

@syroy syroy added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Nov 7, 2024
@syroy syroy closed this as completed Nov 7, 2024
Copy link

github-actions bot commented Nov 7, 2024

⚠️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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

1 participant