# I won't include the whole localstack config as it isn't relevant.
If you’ve specified a default region, when you initialise the AWS SDK, it will expect a region to be passed in.
For eg:
// correct ✅const AWS = require('aws-sdk')const s3 = new AWS.S3({ endpoint: 'http://172.28.1.9:4566', accessJeyId: 'someAccessKeyId', secretAccessKey: 'someSecretAccessKey', s3ForcePathStyle: true, region: 'us-east-1', // read note below* })*NOTE: If you've got a DEFAULT_REGION in you docker-compose.yml file, you will need to pass in a region
I thought I’d write this up in case it helps someone else. The error message wasn’t very helpful and I spent more time than I’d like to admit on it.