feat: removed explicit check for aws access key credential allowing to pick it automatically

This commit is contained in:
=
2024-06-27 13:05:30 +05:30
parent 8eea82a1a0
commit d5b17a8f24
@@ -720,15 +720,15 @@ const syncSecretsAWSSecretManager = async ({
let secretAccessKey = ""; let secretAccessKey = "";
let sessionToken; let sessionToken;
if (awsAssumeRoleArn) { if (awsAssumeRoleArn) {
if (!appCfg.CLIENT_ID_AWS_INTEGRATION || !appCfg.CLIENT_SECRET_AWS_INTEGRATION)
throw new Error("Missing AWS Credentials for Assuming Role. Contact server admin.");
const client = new STSClient({ const client = new STSClient({
region: integration.region as string, region: integration.region as string,
credentials: { credentials:
accessKeyId: appCfg.CLIENT_ID_AWS_INTEGRATION, appCfg.CLIENT_ID_AWS_INTEGRATION && appCfg.CLIENT_SECRET_AWS_INTEGRATION
secretAccessKey: appCfg.CLIENT_SECRET_AWS_INTEGRATION ? {
} accessKeyId: appCfg.CLIENT_ID_AWS_INTEGRATION,
secretAccessKey: appCfg.CLIENT_SECRET_AWS_INTEGRATION
}
: undefined
}); });
const command = new AssumeRoleCommand({ const command = new AssumeRoleCommand({
RoleArn: awsAssumeRoleArn, RoleArn: awsAssumeRoleArn,