配置RamRole实现ECS实例的无AK访问,是真的不需要AK么?

文档只配置了如下信息,
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());
    }

但是JAVA后端却不能访问,这种是否也需要子用户的access Key呢?

上一篇:一些IT开发工程师的悲哀( 转)


下一篇:业务逻辑和代码逻辑