Sample code for 30+ languages & platforms
AutoIt

Example: Http.S3_FileExists method

Demonstrates the S3_FileExists method.

Chilkat AutoIt Downloads

AutoIt
$oHttp = ObjCreate("Chilkat.Http")

; Insert your AWS keys here:
$oHttp.AwsAccessKey = "AWS_ACCESS_KEY"
$oHttp.AwsSecretKey = "AWS_SECRET_KEY"

Local $sBucketName = "chilkat.ocean"
Local $sObjectName = "seahorse.jpg"
$oHttp.AwsRegion = "us-west-2"
$oHttp.AwsEndpoint = "s3-us-west-2.amazonaws.com"

Local $iRetval = $oHttp.S3_FileExists($sBucketName,$sObjectName)
If ($iRetval < 0) Then
    ConsoleWrite("Failed to check for the S3 object existence" & @CRLF)
    ConsoleWrite($oHttp.LastErrorText & @CRLF)
    Exit
EndIf

If ($iRetval = 0) Then
    ConsoleWrite("The S3 object does not exist." & @CRLF)
    Exit
EndIf

ConsoleWrite("The S3 object exists." & @CRLF)