-
Notifications
You must be signed in to change notification settings - Fork 62
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
Get exception from get_aws_region when call it in GitHub Actions #657
Comments
I am seeing the exact same HTTP 400 error coming from [1] refresh_token!(session::AWS.IMDS.Session, duration::Int16)
@ AWS.IMDS ~/.julia/packages/AWS/SchLh/src/IMDS.jl:94
[2] refresh_token!
@ ~/.julia/packages/AWS/SchLh/src/IMDS.jl:53 [inlined]
[3] request(session::AWS.IMDS.Session, method::String, path::String; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ AWS.IMDS ~/.julia/packages/AWS/SchLh/src/IMDS.jl:104
[4] request
@ ~/.julia/packages/AWS/SchLh/src/IMDS.jl:100 [inlined]
[5] get(session::AWS.IMDS.Session, path::String)
@ AWS.IMDS ~/.julia/packages/AWS/SchLh/src/IMDS.jl:168
[6] get
@ ~/.julia/packages/AWS/SchLh/src/IMDS.jl:180 [inlined]
[7] ec2_instance_credentials(profile::String)
@ AWS ~/.julia/packages/AWS/SchLh/src/AWSCredentials.jl:233
[8] (::AWS.var"#12#18"{String})()
@ AWS ~/.julia/packages/AWS/SchLh/src/AWSCredentials.jl:132
[9] AWS.AWSCredentials(; profile::Nothing, throw_cred_error::Bool)
@ AWS ~/.julia/packages/AWS/SchLh/src/AWSCredentials.jl:138
[10] AWS.AWSConfig()
@ AWS ~/.julia/packages/AWS/SchLh/src/AWSConfig.jl:32
[11] #global_aws_config#91
@ ~/.julia/packages/AWS/SchLh/src/AWS.jl:81 [inlined]
[12] global_aws_config
@ ~/.julia/packages/AWS/SchLh/src/AWS.jl:79 [inlined] |
Aha. It turns out I had commented out this block in my github actions workflow: - uses: aws-actions/configure-aws-credentials@v2
with:
aws-region: us-east-2
role-to-assume: arn:aws:iam::[...redacted...]
role-duration-seconds: 43200 Once I added that back, I got expected behavior. So I think there is something wrong where misconfigured s3 role/access gives a very weird/confusing error here. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there. I encounter a problem when I use aws_get_region in GitHub actions with Miscrosoft servers
Here is the function call:
config = AWSConfig(;creds=auth_params, region=@mock(aws_get_region(default=DEFAULT_REGION)))
So I'm expecting to get DEFAULT_REGION because I don't have any ENV vars for region in GitHub actions and it's running on a Microsoft server.
But instead, before returning default region
aws_get_region
function calls IMDS and I get this error:With this stacktrace:
I see several problems here, for your consideration:
aws_get_region
should be wrapped in try-catch to return a default value on error.The text was updated successfully, but these errors were encountered: