Situation:backup file to s3 and send mail …
Must:aws access-key save linux user table of contents
Ref:https://docs.aws.amazon.com/general/latest/gr/managing-aws-access-keys.html
Content:my shell script
#!/bin/bash NOW=$(date +"%a") /usr/local/bin/aws s3 cp /root/iotc/hostlist s3://tutk-op/P2P_backup/w0/p2p_hostlist_"$NOW" /usr/local/bin/aws ses send-email --from [email protected] --destination "[email protected]" --message "Subject={Data='"\["Backup"\]""\["w0"\]" p2p hostfile backup success.'},Body={Text={Data=ses says hi,Charset=utf8},Html={Data=success,Charset=utf8}}"