I am writing my own client, I configure each step and unsuccessfully step return a message the connection is unseccessfully because the client return an empty content specifically from Amazon using a POST method; the next is the client:
socket(SERVER,AF_INET,SOCK_STREAM,getprotobyname('tcp'));
$iaddr = inet_aton($host) || return(700,"Invalid Host: $host"

;
$paddr = sockaddr_in(80, $iaddr) || return(700,"Invalid paddr: $host"

;
socket(SOCK, AF_INET, SOCK_STREAM, $proto) || return (700,"socket error: $!"

;
connect(SOCK, $paddr) || return (400,"connect error: $!"

;
select(SOCK);$|=1;
select(STDOUT);
print SOCK "POST $request HTTP/1.0\n",'Host: ',$host,"\n";
print SOCK "Content-Type: application/x-
print SOCK "Content-Length: $len\n\n";
print SOCK "$vars\n\n";
while (defined($line = <SOCK>)) {
my $now = time;
$diff = ($now-$start);
if( $diff >= $timeout ) { return(600,"Timeout"

; }
$header .= $line;
}
return(500,"Connection refused!"

unless $header;
close (SOCK) || return( 700,"close error: $!" );