<p>The answer is highly dependent on what you put inside it, if the states are only account related I'd go with a separate S2/dynamodb per account, if the states are cross-account then you'd need a central place to record them.</p>

CC BY-SA 4.0
2018-10-11T11:27:17.827Z
2018-10-11T11:27:17.827Z
Tensibai
<p>I've read up on Terraform and using AWS S3 and DynamoDB for sharing state and locking. My problem is that we have multiple AWS accounts, by which I mean multiple sign-in locations like:</p>

<ul>
<li><a href="https://account1.signin.aws.amazon.com/console" rel="nofollow noreferrer">https://account1.signin.aws.amazon.com/console</a></li>
<li><a href="https://account2.signin.aws.amazon.com/console" rel="nofollow noreferrer">https://account2.signin.aws.amazon.com/console</a></li>
</ul>

<p>Is it better to have separate S3 and DynamoDB instances in each account, or should we have a single location that's used across all of them?</p>

CC BY-SA 4.0
2018-10-11T22:32:36.737Z
We keep it separate. Each account has an S3 and DynamoDB for its state.
myron-semack
<amazon-web-services><terraform>
How do I handle multiple AWS accounts in Terraform?
parsley72
# How do I handle multiple AWS accounts in Terraform?

(Asked by: username_0 on 2018-10-11)

I've read up on Terraform and using AWS S3 and DynamoDB for sharing state and locking. My problem is that we have multiple AWS accounts, by which I mean multiple sign-in locations like:

* <https://account1.signin.aws.amazon.com/console>
* <https://account2.signin.aws.amazon.com/console>

Is it better to have separate S3 and DynamoDB instances in each account, or should we have a single location that's used across all of them?

**Tags:** amazon-web-services, terraform

> **Comments:**
> **username_1**: We keep it separate. Each account has an S3 and DynamoDB for its state.  

---

## 1 answers

### Answer by username_2 on 2018-10-11. Score: 1 | Accepted answer

The answer is highly dependent on what you put inside it, if the states are only account related I'd go with a separate S2/dynamodb per account, if the states are cross-account then you'd need a central place to record them.


---

