You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have verified all of my SDK modules are up-to-date (you can perform a bulk update with go get -u github.com/aws/aws-sdk-go-v2/...)
Describe the bug
I am using PresignPostObject method of the PresignClient
and I am setting the conditions as
Conditions: []interface{}{
[]string{"starts-with", "$key", key},
[]string{"eq", "$Content-Type", "application/pdf"},
},
with the key being statement_503383/
Regression Issue
Select this option if this issue appears to be a regression.
Expected Behavior
Allow the upload the file with the prefix.
Current Behavior
but when I try to upload the file using the payload that PresignPostObject returns and with the key statement_503383/testfile.pdf
api itself gives:
Invalid according to Policy: Policy Condition failed: ["eq", "$key", "statement_50333804/"]
when key is statement_503383/testfile.pdf
I did not set that policy and I couldn't figure out where it is coming from.
this is not working:
Conditions: []interface{}{
[]string["starts-with", "$key", "statement_50333804/"],
},
and it was adding both starts-with and eq conditions to the policy:
This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
Acknowledgements
go get -u github.com/aws/aws-sdk-go-v2/...
)Describe the bug
I am using PresignPostObject method of the PresignClient
and I am setting the conditions as
Conditions: []interface{}{
[]string{"starts-with", "$key", key},
[]string{"eq", "$Content-Type", "application/pdf"},
},
with the key being statement_503383/
Regression Issue
Expected Behavior
Allow the upload the file with the prefix.
Current Behavior
but when I try to upload the file using the payload that PresignPostObject returns and with the key statement_503383/testfile.pdf
api itself gives:
Invalid according to Policy: Policy Condition failed: ["eq", "$key", "statement_50333804/"]
when key is statement_503383/testfile.pdf
I did not set that policy and I couldn't figure out where it is coming from.
Reproduction Steps
input := &s3.PutObjectInput{
Bucket: &bucket,
Key: &key,
}
Possible Solution
No response
Additional Information/Context
No response
AWS Go SDK V2 Module Versions Used
github.com/aws/aws-sdk-go-v2 v1.34.0
github.com/aws/aws-sdk-go-v2/service/s3 v1.71.0
github.com/aws/aws-sdk-go-v2/service/sns v1.33.7
github.com/aws/aws-sdk-go-v2/service/sqs v1.37.2
Compiler and Version used
go version go1.23.0 darwin/arm64
Operating System and version
macOS
The text was updated successfully, but these errors were encountered: