My low-budget website
Written
curl -s https://ip-ranges.amazonaws.com/ip-ranges.json | jq '.prefixes[] | select(.region == "ap-southeast-2" and .service == "S3").ip_prefix'
tcpdump -ni any "tcp port 443 and (net 54.231.248.0/22 or net 54.231.252.0/24 or net 52.92.52.0/22 or net 52.95.128.0/21)" ... 17:57:08.504279 IP 192.168.80.252.54392 > 52.95.132.33.443: Flags [S], seq 4232311673, win 29200, options [mss 1460,sackOK,TS val 770488105 ecr 0,nop,wscale 7], length 0 17:57:08.545803 IP 52.95.132.33.443 > 192.168.80.252.54392: Flags [S.], seq 3514300483, ack 4232311674, win 29200, options [mss 1432,wscale 8,nop,sackOK,nop,nop], length 0 ...
/ip firewall address-list add list=aws-s3-apse2 comment="AWS S3 Sydney" address="54.231.248.0/22" add list=aws-s3-apse2 comment="AWS S3 Sydney" address="54.231.252.0/24" add list=aws-s3-apse2 comment="AWS S3 Sydney" address="52.92.52.0/22" add list=aws-s3-apse2 comment="AWS S3 Sydney" address="52.95.128.0/21"
/ip firewall mangle add chain=forward action=mark-connection new-connection-mark=aws-s3-sydney proto=tcp dst-port=443 dst-address-list=aws-s3-apse2 add chain=forward action=mark-packet connection-mark=aws-s3-sydney new-packet-mark=AWS-S3-Upload
/queue tree add limit-at=20M max-limit=20M name=upload parent=ether5 \ priority=6 queue=pcq-upload-default comment="base parent upload" add limit-at=20M max-limit=20M name=upload_pri_2 \ packet-mark=no-mark parent=upload priority=2 \ queue=pcq-upload-default comment="Regular unmarked upload traffic" add limit-at=10M max-limit=10M name=s3_low_pri_8 \ packet-mark=AWS-S3-Upload parent=upload priority=8 \ queue=pcq-upload-default comment="Govern bulk AWS S3 upload traffic"
dd bs=1M count=1000 if=/dev/urandom of=1GB.test aws s3 cp 1GB.test s3://my-bucket/