Skip to content

Commit

Permalink
AWS DocDB does not support retryWrites https://docs.aws.amazon.com/do…
Browse files Browse the repository at this point in the history
  • Loading branch information
karendolan authored and lbjay committed Jan 8, 2025
1 parent 95bd887 commit fe85f5e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions bin/docdb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ DB_PASSWORD=`aws secretsmanager get-secret-value --secret-id $DB_PASSWORD_SECRET
version_four="4.0.0"
if [ "$(printf '%s\n' "$version_four" "$MONGO_VERSION" | sort -V | head -n1)" = "$version_four" ]; then
echo "Using mongo > v4"
MONGO_OPTIONS="--tls --tlsAllowInvalidHostnames --tlsAllowInvalidCertificates"
MONGO_OPTIONS="--tls --tlsAllowInvalidHostnames --tlsAllowInvalidCertificates --retryWrites=false"
else
MONGO_OPTIONS="--ssl --sslAllowInvalidHostnames --sslAllowInvalidCertificates"
MONGO_OPTIONS="--ssl --sslAllowInvalidHostnames --sslAllowInvalidCertificates --retryWrites=false"
fi

# we need the bastion host's availability zone and public ip to copy our key there and set up the ssh tunnel
Expand Down
2 changes: 1 addition & 1 deletion cdk/lib/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ export class CacclDocDb extends CacclDbBase {
appEnv.addEnvironmentVar('MONGO_HOST', `${this.host}:${this.port}`);
appEnv.addEnvironmentVar(
'MONGO_OPTIONS',
'tls=true&tlsAllowInvalidCertificates=true',
'tls=true&tlsAllowInvalidCertificates=true&retryWrites=False',
);
appEnv.addSecret(
'MONGO_PASS',
Expand Down

0 comments on commit fe85f5e

Please sign in to comment.