Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added AWS credentials file example #29

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions examples/s3-to-s3-cross-account/.header.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,16 @@
This example demonstrates how to create a S3 to S3 replication scenario across AWS Accounts using the AWS DataSync module.

![AWS Datasync S3 to S3 Cross Account](./datasync-examples-cross-account.png)

In this example, the default source and destination account AWS CLI profiles are named as `source-account` and `destination-account` in [variables.tf](./variables.tf). Add the following text to the shared credentials file. Replace the sample values with the credentials you copied. Review [Authenticating with short-term credentials for the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-authentication-short-term.html) documentation for more information.
```bash
[source-account]
aws_access_key_id = EXAMPLE
aws_secret_access_key = EXAMPLEKEY
aws_session_token = LONGSTRINGEXAMPLE

[destination-account]
aws_access_key_id = EXAMPLE
aws_secret_access_key = EXAMPLEKEY
aws_session_token = LONGSTRINGEXAMPLE
```