Generates a presigned URL that grants temporary, signed access to an object in an S3 (or S3-compatible) bucket. The expireDate argument accepts a datetime (the URL is valid until that instant) or a plain number of minutes; it defaults to 15 minutes.
s3GeneratePresignedURL(bucket, object [, expireDate, httpMethod, accessKeyId, secretKey, host])
→ returns string
15GETCreates a URL that expires in 60 minutes.
url = s3GeneratePresignedURL("my-bucket", "reports/q3.pdf", 60);
The fourth argument selects the HTTP method.
url = s3GeneratePresignedURL("my-bucket", "uploads/new.txt", 15, "PUT");
Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.