Sample code for 30+ languages & platforms
AutoIt

Generate S3 Signed URL

See more Amazon S3 Examples

Demonstrates how to generate a pre-signed S3 URL.

Chilkat AutoIt Downloads

AutoIt
; This example assumes the Chilkat API to have been previously unlocked.
; See Global Unlock Sample for sample code.

$oHttp = ObjCreate("Chilkat.Http")

; Insert your access key here:
$oHttp.AwsAccessKey = "AWS_ACCESS_KEY"

; Insert your secret key here:
$oHttp.AwsSecretKey = "AWS_SECRET_KEY"

$oHttp.AwsRegion = "us-west-2"
$oHttp.AwsEndpoint = "s3-us-west-2.amazonaws.com"

Local $sBucketName = "chilkattest"
Local $sPath = "starfish.jpg"

Local $signedUrl = $oHttp.S3_GenPresignedUrl("GET",True,$sBucketName,$sPath,3600,"s3")
If ($oHttp.LastMethodSuccess = False) Then
    ConsoleWrite($oHttp.LastErrorText & @CRLF)
    Exit
EndIf

ConsoleWrite($signedUrl & @CRLF)