Unable to resolve S3 host for primary storage setup

I have been attempting to get a docker image set up to use s3 as primary storage
I have used the environment variables as such

  - OBJECTSTORE_S3_BUCKET=<bucketname>
  - OBJECTSTORE_S3_KEY=<secret>

I have tested the user and credentials I created and they are working. However in the detailed logs I am seeing an error that says “Could not resolve host: bucketname.s3.amazonaws.com”. I am not sure if there is some S3 configuration step I missed or an incorrect config for Nextcloud. Any help would be appreciated

The issues I was dealing with were caused by the colima configuration and not nextcloud. For anyone running docker on colima on mac, colima needs to be run with the --network-address flag for nextcloud to work.

Answer added to post