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

s3_get_file error not useful when incorrect region is used #305

Open
a-cakir opened this issue Mar 26, 2024 · 0 comments
Open

s3_get_file error not useful when incorrect region is used #305

a-cakir opened this issue Mar 26, 2024 · 0 comments

Comments

@a-cakir
Copy link

a-cakir commented Mar 26, 2024

Running

s3_get_file(AWS.AWSConfig(;profile="xxx",region="eu-central-1"),bucket, prefix, filename)

works as intended, however if one changes the region from eu-central-1 to say us-east-1, then running the same code leads to the (not so useful) error below,

s3_get_file(AWS.AWSConfig(;profile="profile",region="us-east-1"),bucket, prefix, filename)
ERROR: type Nothing has no field method
Stacktrace:
  [1] getproperty(x::Nothing, f::Symbol)
    @ Base ./Base.jl:38
  [2] statuserror(status::Int16, resp::HTTP.Messages.Response)
    @ AWS ~/.julia/packages/AWS/Fxun1/src/utilities/request.jl:32
  [3] (::AWS.var"#41#44"{AWSConfig, Request, Base.BufferStream, Vector{Int64}})()
    @ AWS ~/.julia/packages/AWS/Fxun1/src/utilities/request.jl:141
  [4] (::AWS.var"#42#46"{AWS.var"#41#44"{AWSConfig, Request, Base.BufferStream, Vector{Int64}}, Base.BufferStream})()
    @ AWS ~/.julia/packages/AWS/Fxun1/src/utilities/request.jl:149
  [5] (::Base.var"#88#90"{Base.var"#88#89#91"{AWS.AWSExponentialBackoff, AWS.var"#43#47"{AWSConfig, Vector{String}, Vector{String}, Int64}, AWS.var"#42#46"{AWS.var"#41#44"{AWSConfig, Request, Base.BufferStream, Vector{Int64}}, Base.BufferStream}}})(; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Base ./error.jl:296
  [6] (::Base.var"#88#90"{Base.var"#88#89#91"{AWS.AWSExponentialBackoff, AWS.var"#43#47"{AWSConfig, Vector{String}, Vector{String}, Int64}, AWS.var"#42#46"{AWS.var"#41#44"{AWSConfig, Request, Base.BufferStream, Vector{Int64}}, Base.BufferStream}}})()
    @ Base ./error.jl:291
  [7] submit_request(aws::AWSConfig, request::Request; return_headers::Nothing)
    @ AWS ~/.julia/packages/AWS/Fxun1/src/utilities/request.jl:200
  [8] (::RestXMLService)(request_method::String, request_uri::String, args::Dict{String, Any}; aws_config::AWSConfig, feature_set::AWS.FeatureSet)
    @ AWS ~/.julia/packages/AWS/Fxun1/src/AWS.jl:287
  [9] #get_object#90
    @ ~/.julia/packages/AWS/Fxun1/src/services/s3.jl:2785 [inlined]
 [10] macro expansion
    @ ~/.julia/packages/AWSS3/8cxdr/src/AWSS3.jl:166 [inlined]
 [11] macro expansion
    @ ~/.julia/packages/Retry/vS1bg/src/repeat_try.jl:192 [inlined]
 [12] s3_get(aws::AWSConfig, bucket::String, path::String; version::Nothing, retry::Bool, raw::Bool, byte_range::Nothing, headers::Dict{String, Any}, return_stream::Bool, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ AWSS3 ~/.julia/packages/AWSS3/8cxdr/src/AWSS3.jl:148
 [13] #s3_get_file#6
    @ ~/.julia/packages/AWSS3/8cxdr/src/AWSS3.jl:199 [inlined]
 [14] s3_get_file(aws::AWSConfig, bucket::String, path::String, filename::String)
    @ AWSS3 ~/.julia/packages/AWSS3/8cxdr/src/AWSS3.jl:191
 [15] top-level scope
    @ REPL[17]:1
@a-cakir a-cakir changed the title s3_get_file error not useful when incorrect role is used s3_get_file error not useful when incorrect region is used Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant