I have asked where do you run the container, but based on the available information and the fact that you are mentioning local environment I'm assuming that you do it on a dev machine.
That being said, one option is to pass the region as an env variable when you start the container:
docker run -e AWS_DEFAULT_REGION="eu-west-2"
or directly set it in your Dockerfile during build with ARG or ENV (ARG is not persistent and won't be present if you start a container from the resulting image)
FROM mcr.microsoft.com/dotnet/runtime:5.0
ARG AWS_DEFAULT_REGION
WORKDIR BackendRouterApp/
COPY deploy/Release/BackendRouter .
ENTRYPOINT ["dotnet","BackendRouterService.dll"]
and then:
$ docker build --build-arg AWS_DEFAULT_REGION="eu-west-2"
with ENV:
FROM mcr.microsoft.com/dotnet/runtime:5.0
ARG AWS_DEFAULT_REGION
# use the value to set the ENV var default
ENV AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION
WORKDIR BackendRouterApp/
COPY deploy/Release/BackendRouter .
ENTRYPOINT ["dotnet","BackendRouterService.dll"]
In addition, you can pass an env_var file with more than one environment variable if needed.
I would assume that you'll need to pass the AWS credentials from your profile too in order to access SQS where you can use the same approach or better yet pass the local environment variables to the container on runtime in order to not hard ode them in your code.
The answers in this SO question have some great tips in that regard:
What is the best way to pass AWS credentials to a Docker container?