LFS with AWS S3

Hi Team

I am new to deploying gitlab servers, I am trying to deploy an LFS with S3 AWS.

I am using an IAM profile, I can access the buckets from the gitlab VM using the aws cli, but when I try to upload files it does not work.

My config is as follows:
gitlab_rails[‘object_store’][‘enabled’] = true
gitlab_rails[‘object_store’][‘connection’] = {
‘provider’ => ‘AWS’,
‘region’ => ‘us-eastl-1’,
‘use_iam_profile’ => true
}
#gitlab_rails[‘object_store’][‘storage_options’] = {}
gitlab_rails[‘object_store’][‘proxy_download’] = true
gitlab_rails[‘object_store’][‘objects’][‘artifacts’][‘bucket’] = ‘kichitan-s31’
gitlab_rails[‘object_store’][‘objects’][‘external_diffs’][‘bucket’] = ‘kichitan-s32’
gitlab_rails[‘object_store’][‘objects’][‘lfs’][‘bucket’] = ‘kichitan-s33’
gitlab_rails[‘object_store’][‘objects’][‘uploads’][‘bucket’] = ‘kichitan-s34’
gitlab_rails[‘object_store’][‘objects’][‘packages’][‘bucket’] = ‘kichitan-s35’
gitlab_rails[‘object_store’][‘objects’][‘dependency_proxy’][‘bucket’] = ‘kichitan-s36’
gitlab_rails[‘object_store’][‘objects’][‘terraform_state’][‘bucket’] = ‘kichitan-s37’
gitlab_rails[‘object_store’][‘objects’][‘ci_secure_files’][‘bucket’] = ‘kichitan-s38’
gitlab_rails[‘object_store’][‘objects’][‘pages’][‘bucket’] = ‘kichitan-s39’

If someone can share what is the best config for my S3 buckets, all of them were created with the default settings on AWS.

When I try to updload file to gitlab I keep on getting this error:

“Error uploading file. Please try again.”

On the log production.log I just see this:
Excon::Error::Socket (no address for kichitan-s33.s3.us-eastl-1.amazonaws.com (Resolv::ResolvError)):
Hope anyone can help me or guide me in the right direcction.
I try to use this guide
Object storage | GitLab

1 Like

I’ve also been having this issue, but with GitLab backups. I’ve set up GitLab to backup to S3 in gitlab.rb, but when I run gitlab-backup, it gets to Deleting backup and restore PID file ... done, then spits out the following stacktrace:

rake aborted!
Excon::Error::Socket: no address for my-bucket-name.s3.ap-southeast-2.amazonaws.com (Reso
lv::ResolvError)
/opt/gitlab/embedded/service/gitlab-rails/lib/backup/manager.rb:345:in `upload'
/opt/gitlab/embedded/service/gitlab-rails/lib/backup/manager.rb:234:in `run_all_create_tasks'
/opt/gitlab/embedded/service/gitlab-rails/lib/backup/manager.rb:47:in `create'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/backup.rake:13:in `block in create_backup'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/backup.rake:62:in `lock_backup'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/backup.rake:10:in `create_backup'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/backup.rake:101:in `block (3 levels) in <top (required)>'
/opt/gitlab/embedded/bin/bundle:25:in `load'
/opt/gitlab/embedded/bin/bundle:25:in `<main>'

Caused by:
Resolv::ResolvError: no address for my-bucket-name.s3.ap-southeast-2.amazonaws.com
/opt/gitlab/embedded/service/gitlab-rails/lib/backup/manager.rb:345:in `upload'
/opt/gitlab/embedded/service/gitlab-rails/lib/backup/manager.rb:234:in `run_all_create_tasks'
/opt/gitlab/embedded/service/gitlab-rails/lib/backup/manager.rb:47:in `create'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/backup.rake:13:in `block in create_backup'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/backup.rake:62:in `lock_backup'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/backup.rake:10:in `create_backup'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/backup.rake:101:in `block (3 levels) in <top (required)>'
/opt/gitlab/embedded/bin/bundle:25:in `load'
/opt/gitlab/embedded/bin/bundle:25:in `<main>'
Tasks: TOP => gitlab:backup:create
(See full trace by running task with --trace)

The error seems to say:

Resolv::ResolvError: no address for my-bucket-name.s3.ap-southeast-2.amazonaws.com

so has problems resolving the DNS for the bucket. Check your DNS configuration on the machine.

Hi Walker

That was the first thing to check, but the VM can solve any DNS without problem, I think the issue on the S3 configuration since that URL does not exist, but I can write to the buckets from the VM using aws cli.

If you have any tips as how to configure the bucket for this will be appreciated.

HI Team

I was able to resolve the issue I had a type on the AWS region us-eastl-1 as you can see.