Troubleshooting
Problem
Introduction:
This article covers how to configure Secret sync with AWS cross-account access. Please remember that the examples provided below are illustrative. Account IDs and roles should be used according to your environment.
Prerequisites:
Two AWS accounts. One is for the Vault hosted on the ec2 instance in this article, and the other is for Secret sync. Here for this article, I created two AWS accounts.
Vault AWS account ID reference:- 288xxxx6095
Secret Sync AWS Account ID reference:- 730xxxxx588
- EC2 running with Vault binary.
Setup:
- Created a policy in the Secret sync account. This policy allows read/write on the Secret sync. You can restrict action based on your organization's requirements. Added a Vault AWS account as a trust relationship.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::288xxxx6095:root"
},
"Action": "sts:AssumeRole",
"Condition": {}
}
]
}- Created role in secret sync account and attached the policy.
Role ARN - arn:aws:iam::730xxxxx588:role/test100{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::288802576095:root"
},
"Action": "sts:AssumeRole",
"Condition": {}
}
]
}- Create the policy "Cross-Account-AssumeRole-policy" which will be attached to the role (arn:aws:iam::
288xxxx6095: role/role-vault-test-100)
{
"Version": "2012-10-17",
"Statement": {
"Effect": "Allow",
"Action": "sts:AssumeRole",
"Resource": "arn:aws:iam::730xxxxx588:role/test100"
}
}- In the same Vault account where EC2 is running, attached is the role mentioned in step 4.
- Login to the Vault and enable the KV engine.
vault secrets enable -path=secret kv-v2
vault kv put secret/cloud/dev api_key="amazon" key_id="aws"- To configure the secret sync destination we used only the "role_arn" parameter and passed the role created in the secret sync account.
vault write sys/sync/destinations/aws-sm/cloudy role_arn=arn:aws:iam::730xxxxx588:role/test100 region=us-east-1.
Key Value
--- -----
connection_details map[region:us-east-1 role_arn:arn:aws:iam::730335400588:role/test100]
name cloudy
type aws-sm- Configure the association:
@-GRH19909DT ~ % vault write sys/sync/destinations/aws-sm/cloudy/associations/set mount="secret" secret_name="cloud/dev"
Key Value
--- -----
associated_secrets map[kv_84dd95cd/cloud/dev:map[accessor:kv_84dd95cd secret_name:cloud/dev sync_status:SYNCED updated_at:2024-05-24T04:23:30.978535458Z]]
store_name cloudy
store_type aws-sm
Useful Links:
Document Location
Worldwide
[{"Type":"MASTER","Line of Business":{"code":"LOB77","label":"Automation Platform"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSLC9Y2","label":"IBM Vault Self-Managed"},"ARM Category":[{"code":"a8mgJ0000000E6EQAU","label":"Vault-\u003EOther"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"1.14.10;1.14.11;1.14.12;1.14.13;1.14.4;1.14.5;1.14.6;1.14.7;1.14.8;1.14.9;1.15.0;1.15.1;1.15.10;1.15.11;1.15.12;1.15.13;1.15.14;1.15.15;1.15.16;1.15.2;1.15.3;1.15.4;1.15.5;1.15.6;1.15.7;1.15.8;1.15.9;1.16.0;1.16.1;1.16.10;1.16.11;1.16.12;1.16.13;1.16.14;1.16.15;1.16.16;1.16.17;1.16.18;1.16.19;1.16.2;1.16.20;1.16.21;1.16.22;1.16.23;1.16.24;1.16.25;1.16.26;1.16.27;1.16.28;1.16.29;1.16.3;1.16.30;1.16.31;1.16.4;1.16.5;1.16.6;1.16.7;1.16.8;1.16.9;1.17.0;1.17.1;1.17.10;1.17.11;1.17.12;1.17.13;1.17.14;1.17.15;1.17.16;1.17.17;1.17.18;1.17.2;1.17.3;1.17.4;1.17.5;1.17.6;1.17.7;1.17.8;1.17.9;1.18.0;1.18.1;1.18.10;1.18.11;1.18.12;1.18.13;1.18.14;1.18.15;1.18.2;1.18.3;1.18.4;1.18.5;1.18.6;1.18.7;1.18.8;1.18.9;1.19.0;1.19.1;1.19.10;1.19.11;1.19.12;1.19.13;1.19.14;1.19.15;1.19.16;1.19.17;1.19.2;1.19.3;1.19.4;1.19.5;1.19.6;1.19.7;1.19.8;1.19.9;1.20.0;1.20.1;1.20.10;1.20.11;1.20.2;1.20.3;1.20.4;1.20.5;1.20.6;1.20.7;1.20.8;1.20.9;1.21.0;1.21.1;1.21.2;1.21.3;1.21.4;1.21.5;1.21.6;2.0.0;2.0.1;4.2.0-5.4.0"}]
Historical Number
30362873926419
Was this topic helpful?
Document Information
Modified date:
25 May 2026
UID
ibm17264461