AWS CLI is a command line tool used for interacting with AWS services.
In this post, I'll share the command to sync your local files to S3 bucket by removing files in the bucket that are not present in the local folder.
$ aws s3 sync . s3://bucket-name --delete
--delete option deletes the files in bucket that doesn't exists in the local folder.
Hope this helps!