Logstash S3 input plugin doesn't work

This is what I got in logstash.log

{:timestamp=>"2016-04-25T17:26:13.863000+0800", :message=>"A plugin had an unrecoverable error. Will restart this plugin.\n Plugin: <LogStash::Inputs::S3 bucket=>"xxx-elb-log", access_key_id=>"xxxxxxxx", secret_access_key=>"xxxxxx", interval=>300, prefix=>"xxx/AWSLogs", region=>"cn-north-1", tags=>["xxx", "elb"], type=>"xxx", use_ssl=>true, codec=><LogStash::Codecs::Plain charset=>"UTF-8">, delete=>false, temporary_directory=>"/var/lib/logstash/logstash">\n Error: initialize: name or service not known", :level=>:error}

Here is the configuration about s3 input

input {
s3 {
bucket => "xxx-elb-log"
access_key_id => "xxxxxxx"
secret_access_key => "xxxxxx"
interval => 300
prefix => "xxx/AWSLogs"
region => "cn-north-1"
tags => ["xxx","elb"]
type => "xxx"
use_ssl => true

I installed logstash using logstash-all-plugins-2.3.1.tar.gz

The "name or service not known" error message typically means a DNS lookup issue. The GitHub issue below seems to describe the problem and contains a workaround.

Thanks for reply.

The error message came out again after I changed input-s3 plugin .
And the connection to s3 server of aws cn-north-1 region was OK.
By the way, logstash was running on a aws EC2 instance in cn-north-1 region.

ping s3.cn-north-1.amazonaws.com.cn
PING s3.cn-north-1.amazonaws.com.cn ( 56(84) bytes of data.
64 bytes from icmp_seq=1 ttl=59 time=2.14 ms
64 bytes from icmp_seq=2 ttl=59 time=2.20 ms
64 bytes from icmp_seq=3 ttl=59 time=2.15 ms