Encrypt backup files and send them to AWS S3


I have a backup routine via crontab on Ubuntu. This routine generates a compressed tar.gz file and sends it to AWS S3.

But I want to encrypt these files and be able to decrypt them when necessary on another machine only if I have the private key.

While searching I found gpg, and I execute the command below to compress the backup file:

gpg --output my-backup-file.tar.gz.gpg --encrypt --recipient secret-key-mail-address@example.com my-backup-file.tar.gz 

Is this a safe and good way to encrypt these files?