AutoIt
AutoIt
S3 Download File
See more Amazon S3 Examples
Demonstrates how to download a file from the Amazon S3 service.Chilkat AutoIt Downloads
Local $bSuccess = False
; This requires the Chilkat API to have been previously unlocked.
; See Global Unlock Sample for sample code.
$oHttp = ObjCreate("Chilkat.Http")
$oHttp.AwsAccessKey = "AWS_ACCESS_KEY"
$oHttp.AwsSecretKey = "AWS_SECRET_KEY"
$oHttp.AwsRegion = "us-west-2"
$oHttp.AwsEndpoint = "s3-us-west-2.amazonaws.com"
Local $sBucketName = "chilkat.qa"
Local $sObjectName = "/images/sea_creatures/starfish.jpg"
Local $sLocalFilePath = "qa_output/starfish.jpg"
$bSuccess = $oHttp.S3_DownloadFile($sBucketName,$sObjectName,$sLocalFilePath)
If ($bSuccess <> True) Then
ConsoleWrite($oHttp.LastErrorText & @CRLF)
Else
ConsoleWrite("File downloaded." & @CRLF)
EndIf