Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

block in case of failed sts call

Matheus Nogueiraf1462ee4d965
diff --git a/backend/src/services/secret-sync/secret-sync-maps.ts b/backend/src/services/secret-sync/secret-sync-maps.ts
index fee1690e67..5bcb5c3ae1 100644
--- a/backend/src/services/secret-sync/secret-sync-maps.ts
+++ b/backend/src/services/secret-sync/secret-sync-maps.ts
@@ -236,7 +236,9 @@ const awsDuplicateCheck: DestinationDuplicateCheckFn = async ({ existingSync, ne
getAwsAccountId(buildAwsConnectionConfig(newAwsConn, newAwsConn.credentials))
]);
- if (!existingAccountId || !newAccountId) return false;
+ // If we can't verify the account id of any of the syncs, for safety reasons, we should
+ // tag it as duplicates. Better fail here than cause sync conflicts later.
+ if (!existingAccountId || !newAccountId) return true;
return existingAccountId === newAccountId;
};