0

I am debugging this ansible call in a shell script (I am a complete beginner in ansible)

source /path/.conda/etc/profile.d/conda.sh && \
      conda activate my_ansible && \
      AWS_REGION=us-east-1 \
      AWS_SHARED_CREDENTIALS_FILE=acredsfile \
      ansible-playbook /path/ansible/init.yml \
      -e s3_bucket=${S3_BUCKET}

the ansible task gives me a region not found error

File "/path/.conda/envs/my_ansible/lib/python3.9/site-packages/botocore/regions.py", line 260, in _endpoint_for_partition
    raise NoRegionError()
botocore.exceptions.NoRegionError: You must specify a region.

I think the way the aws region env is being set is correct but apparently not?

user2175783
  • 1,291
  • 1
  • 12
  • 28
  • 1
    Does this answer your question? [boto3 client NoRegionError: You must specify a region error only sometimes](https://stackoverflow.com/questions/40377662/boto3-client-noregionerror-you-must-specify-a-region-error-only-sometimes) – sytech Feb 01 '23 at 02:31
  • @sytech not quite although it is similar. Thanks for the link. – user2175783 Feb 01 '23 at 05:21

0 Answers0