# Tile-db AWs API does not work for other regions than aws

**URL:** <https://forum.tiledb.com/t/tile-db-aws-api-does-not-work-for-other-regions-than-aws/134>\
**Category:** Uncategorized\
**Created:** [January 15, 2020, 1:38am UTC](https://forum.tiledb.com/t/tile-db-aws-api-does-not-work-for-other-regions-than-aws/134 "2020-01-15T01:38:04Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![TileDbUser](https://avatars.discourse-cdn.com/v4/letter/t/a698b9/32.png) [@TileDbUser](https://forum.tiledb.com/u/TileDbUser)\
**Post date:** [January 15, 2020, 6:45pm UTC](https://forum.tiledb.com/t/tile-db-aws-api-does-not-work-for-other-regions-than-aws/134/5 "2020-01-15T18:45:02Z")

</div>

@ihnorton The code you posted worked and I tried to understand what’s the different. I think the major different here is that the `cfg["vfs.s3.region"] = "us-west-1";` needs to be set up before config is assigned to the context and you are also using a single context for each function.

is that what it boils down to? Also, the other thing I wanted to confirm that I do have the region set up in both my ~/.aws/config file and also set in my environment variable. It sounds like tile-db AWS API is able to pick up the credentials(access\_key, secret) from the environment variable/credentials file. however, for region the only way to do is to set it in the code. Is that a correct understanding?

---

_[View the full topic](https://forum.tiledb.com/t/tile-db-aws-api-does-not-work-for-other-regions-than-aws/134)._
