【发布时间】:2017-11-10 13:51:02
【问题描述】:
我必须从 S3 存储桶下载数据,数据已加密,并且我拥有用于解密数据的 kms 密钥。代码在 EC2 实例中运行,并且 EC2 实例具有从 S3 读取的 IAM 角色。 我在this 链接中看到了示例代码,但我无法阅读内容。我收到以下异常
Exception in thread "main" com.amazonaws.SdkClientException: Unable to load credentials into profile [default]: AWS Access Key ID is not specified.
at com.amazonaws.auth.profile.internal.ProfileStaticCredentialsProvider.fromStaticCredentials(ProfileStaticCredentialsProvider.java:55)
at com.amazonaws.auth.profile.internal.ProfileStaticCredentialsProvider.<init>(ProfileStaticCredentialsProvider.java:40)
at com.amazonaws.auth.profile.ProfilesConfigFile.fromProfile(ProfilesConfigFile.java:207)
at com.amazonaws.auth.profile.ProfilesConfigFile.getCredentials(ProfilesConfigFile.java:160)
有人可以建议我哪里出错了,或者就如何在没有凭据的情况下从 S3 存储桶读取加密数据提供一些指导
【问题讨论】:
标签: java amazon-s3 amazon-ec2