A frequent first troubleshooting step is validating the role assigned to an SDB is the actual role being used by your application.
Look up your role name by curling the meta-data endpoint for your ec2 instance:
curl -s http://169.254.169.254/latest/meta-data/iam/security-credentials/
Look up your instance-profile ARN by curling the metadata endpoint:
curl -s http://169.254.169.254/latest/meta-data/iam/info
With the role name you can get the full ARN of the role with:
aws iam get-role --role-name <role-name>
The role ARN for an instance profile can also be looked up using this command:
aws iam get-instance-profile --instance-profile-name <instance-profile-name>
Get your assumed-role identity with this command:
aws sts get-caller-identity
Another common problem is dependency conflicts.
Use these commands to see the Cerberus client version that is actually being resolved in a Java Gradle project:
./gradlew dependencyInsight --dependency cerberus
./gradlew dependencyInsight --dependency vault
./gradlew dependencyInsight --dependency okhttp
./gradlew dependencies
Learn more in the Gradle User Guide.
Debug Maven dependency conflicts using the dependency:tree command.
The SDB you are trying to access may need permissions updated. For example, you will get this error if the IAM role being used isn’t listed for the SDB you are trying to access (see ‘Who am I?’ above).
Unexpectedly, you might also see this error when the path you are trying to access doesn’t exist.
IPs making an excessive number of requests are automatically blacklisted for a configurable interval.
When using polling be sure to use a reasonable interval as determined by your organization.
This error may mean your client is not compatible with TLS1.2, possibly due to being on an old version of Java or other older library.
Java 7 example code available here.
We’ve also seen this during local development as result of a library conflict with the jettyEclipseRun Gradle plugin. Upgrading to the Gretty plugin resolved.
During local development this may be due to a web proxy. This is common in corporate environments and when working over a VPN.
You are probably using an older version of the AWS SDK.
Gradle users can see how dependencies are being resolved with the gradle dependencies
command.
You can force a newer version by adding the following into your build.gradle
// Use the newest version you can, this was current when we wrote this
final String AWS_SDK_VERSION = '1.10.5'
//noinspection GroovyAssignabilityCheck
configurations.all {
resolutionStrategy {
// add a dependency resolve rule
eachDependency { DependencyResolveDetails details ->
//Force use of certain dependencies or versions
if (details.requested.group == 'com.amazonaws') {
details.useVersion(AWS_SDK_VERSION)
}
}
}
}
Maven users can use the dependency tree plugin to learn more about how dependencies are being resolved.