Skip to content

Commit 2ffac69

Browse files
authored
[global] Added hardcoded region to push pull bucket (#1413)
## Summary title says it. Additional context, if you have a region other than `us-east-2` in your `~/.aws/config` specified, global push will fail due to region mismatch in s3 bucket and the s3 request we send to push the profile. ## How was it tested? - change default region specified in ~/.aws/config to anything other than `us-east-2` - run `devbox auth login` - run `devbox global push`
1 parent 85a9b3e commit 2ffac69

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

internal/pullbox/s3/config.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ import (
1616
const (
1717
roleArn = "arn:aws:iam::984256416385:role/JetpackS3Federated"
1818
bucket = "devbox.sh"
19+
// this is a fixed value the bucket resides in this region, otherwise,
20+
// user's default region will get pulled from config and region mismatch
21+
// will result in user not being able to run global push
22+
region = "us-east-2"
1923
)
2024

2125
func assumeRole(ctx context.Context, user *auth.User) (*aws.Config, error) {
@@ -43,6 +47,7 @@ func assumeRole(ctx context.Context, user *auth.User) (*aws.Config, error) {
4347
),
4448
),
4549
)
50+
config.Region = region
4651
if err != nil {
4752
return nil, errors.WithStack(err)
4853
}

0 commit comments

Comments
 (0)