文档只配置了如下信息,
DefaultProfile profile = DefaultProfile.getProfile("");
InstanceProfileCredentialsProvider provider = new InstanceProfileCredentialsProvider(
"<your-role-name>"
);
DefaultAcsClient client = new DefaultAcsClient(profile, provider);
DescribeInstancesRequest request = new DescribeInstancesRequest();
try {
DescribeInstancesResponse response = client.getAcsResponse(request);
} catch (ClientException e) {
System.err.println(e.toString());
}</code></pre>
但是JAVA后端却不能访问,这种是否也需要子用户的access Key呢?