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
getObject::Bucket->T.Text->GetObject
getObject b o =GetObject b o NothingNothingNothingNothingNothingNothingNothingNothing
I ran into this issue writing DeleteObjects. Putting "delete" in the s3QQuery doesn't work. Making the obvious fix to the stringToSign process broke another command, (GetBucket?), so I just put it in s3QSubresources as a hack.
Test case that should generate a 403 (slightly modified version of the GetObject example):
{-# LANGUAGE OverloadedStrings #-}
importqualifiedAwsimportqualifiedAws.S3asS3importqualifiedAws.S3.Commands.GetObjectasGimportData.Conduit (($$+-))
importData.Conduit.Binary (sinkFile)
importNetwork.HTTP.Conduit (withManager, responseBody)
main::IO()
main =do{- Set up AWS credentials and the default configuration. -}
cfg <-Aws.baseConfiguration
let s3cfg =Aws.defServiceConfig ::S3.S3ConfigurationAws.NormalQuery{- Set up a ResourceT region with an available HTTP manager. -}
withManager $\mgr ->do{- Create a request object with S3.getObject and run the request with pureAws. -}S3.GetObjectResponse { S3.gorResponse = rsp } <-Aws.pureAws cfg s3cfg mgr $
(S3.getObject "haskell-aws""cloud-remote.pdf") { G.goResponseCacheControl =Just"300" }
{- Save the response to a file. -}
responseBody rsp $$+- sinkFile "cloud-remote.pdf"
The text was updated successfully, but these errors were encountered:
If you look at s3SignQuery in Aws/S3/Core.hs
You'll see that
differs from its form in the stringToSign
This hasn't been an issue because all of the commands that can set the s3QQuery field
to something other than an empty list do not do so in practice.
Example: in GetObject
In practice, people must use getObject
I ran into this issue writing DeleteObjects. Putting "delete" in the s3QQuery doesn't work. Making the obvious fix to the stringToSign process broke another command, (GetBucket?), so I just put it in s3QSubresources as a hack.
Test case that should generate a 403 (slightly modified version of the GetObject example):
The text was updated successfully, but these errors were encountered: