aws支持的语言Android,浏览器,ios,Java,.NET,Node.js,PHP,Python,Ruby。
1、aws区域选择:
AmazonEC2 ec2 = new AmazonEC2(myCredentials);2、可用的asw sdk的区域列表:
ec2.setEndpoint("https://eu-west-1.ec2.amazonaws.com");
java或android:
AmazonEC2Client ec2 = new AmazonEC2Client(myCredentials);
ec2.setEndpoint("ec2.ap-southeast-1.amazonaws.com");
ec2.describeInstances();
.Net
AmazonElasticLoadBalancingConfig config = new AmazonElasticLoadBalancingConfig();
config.ServiceURL = "https://ap-southeast-1.elasticloadbalancing.amazonaws.com";
AmazonElasticLoadBalancing elb = new AmazonElasticLoadBalancingClient("ACCESS_KEY", "SECRET_KEY", config);
PHP
$ec2 = new AmazonEC2();
$ec2->set_hostname('ec2.ap-southeast-1.amazonaws.com');
$response = $ec2->describe_instances();
IOS
AmazonSimpleDBClient *sdb = [[AmazonSimpleDBClient alloc] initWithAccessKey:@"ACCESS_KEY"
withSecretKey:@"SECRET_KEY"]; sdb.endpoint = @"https://sdb.amazonaws.com";
2、代理配置
在创建一个客户端对象时,可以传递一个com.amazonaws.ClientConfiguration对象自定义客户端配置。
http 连接配置
使用默认的客户端配置对象,但是用户可以更改:1)连接超时时间;2)错误时尝试连接的次数;3)http最大连接数;
tcp套接字大小