Skip to content

Commit

Permalink
[aws] exclude session recordings from S3 sync in teleport-renew-cert (
Browse files Browse the repository at this point in the history
#47622)

This PR excludes `records` directory from the sync when renewing the letsencrypt certificate.
When doing the wildcard sync, `aws sync` downloads the `records` folder which contains audit logs for the cluster which causes failures because of no space left on the disk.
The certbot hook `teleport-upload-cert` doesn't use the `--delete` flag so the records are never purged from S3 on upload

Fixes #27884

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
  • Loading branch information
tigrato authored Oct 16, 2024
1 parent 7483745 commit 2908d2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/aws/files/bin/teleport-renew-cert
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if [ ! -f /etc/teleport.d/role.auth ] && [ ! -f /etc/teleport.d/role.all ]; then
fi

# Fetching certbot state
aws s3 sync --exact-timestamps "s3://${TELEPORT_S3_BUCKET}" /etc/letsencrypt/ --sse=AES256
aws s3 sync '--exclude=records/*' --exact-timestamps "s3://${TELEPORT_S3_BUCKET}" /etc/letsencrypt/ --sse=AES256

# s3 does not support symlinks, we have to create them after the sync, else certbot will fail.
# live/ symlinks point to the latest archive/<domain>/<object>XX.pem where XX is incremented at each cert-renewal.
Expand Down

0 comments on commit 2908d2a

Please sign in to comment.