4 ms·
Standard S3 is $.02/GB, this is $.12/GB so 6x the price. You don't pay data transfer with this solution at least. Quick alternative: #!/bin/bash if [ "$#
by outime 2y ago
Standard S3 is $.02/GB, this is $.12/GB so 6x the price. You don't pay data transfer with this solution at least.
Quick alternative:
#!/bin/bash
if [ "$#" -ne 2 ]; then
echo "Usage: $0 <file-to-upload> <s3-bucket-name>"
exit 1
fi
FILE_TO_UPLOAD=$1
S3_BUCKET=$2
S3_OBJECT_NAME=$(basename "$FILE_TO_UPLOAD")
aws s3 cp "$FILE_TO_UPLOAD" "s3://$S3_BUCKET/$S3_OBJECT_NAME" --acl public-read
if [ $? -eq 0 ]; then
echo "File uploaded successfully."
PUBLIC_URL="https://$S3_BUCKET.s3.amazonaws.com/$S3_OBJECT_NAME"
echo "The file is publicly accessible at: $PUBLIC_URL"
else
echo "Failed to upload file."
exit 1
fi
- martijnarts 2y agoI'm sorry to be harsh, but this is not an alternative to the linked product at all. It's not available through an API, there's no Javascript SDK, there's no CDN configured, you still have to set up and manage an S3 bucket... It's not even in the same category, imo.
- deleted 2y ago[deleted]
- andrewstuart 2y agoI have a few qualms with this.