From 0d0c6cadebb47de674d21e8ca7f231e223fdd229 Mon Sep 17 00:00:00 2001 From: Kawsar Date: Sat, 30 Nov 2024 12:51:16 -0500 Subject: [PATCH] added AWS credentials file example --- examples/s3-to-s3-cross-account/.header.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/examples/s3-to-s3-cross-account/.header.md b/examples/s3-to-s3-cross-account/.header.md index 4b607c3..89fb2b8 100644 --- a/examples/s3-to-s3-cross-account/.header.md +++ b/examples/s3-to-s3-cross-account/.header.md @@ -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 +```