awssdk_config_override.json file not found - Exception AWSSDK

和自甴很熟 提交于 2020-01-15 06:54:09

问题


I have a very simple call to just create a new AmazonS3Client (using Java AWSSDK 1.10.12) like this:

AmazonS3 s3Client = new AmazonS3Client();

And during this call I'm getting the exception message from the AWSDK: Internalconfig.java - "awssdk_config_override.json file not found"

Actual message: 6656 [http-bio-8080-exec-8] DEBUG com.amazonaws.internal.config.InternalConfig -Configuration override awssdk_config_override.json not found.

Totally baffled what's going on here. I can currently only reproduce this on one project, but can't reproduce it when creating new projects from scratch.

Any idea what this json file is even used for? Or why it can't find it or feels the need to find it?


回答1:


The SDK comes bundled with a file called awssdk_config_default.json with various bits of trivia about how to find and authenticate to the different AWS services. When loading up, it also looks for a file on the classpath called "awssdk_config_override.json" that you can optionally provide to override these settings - for example if you want to use a different authentication protocol than what the SDK chooses by default.

This file is not at all required, and almost all users of the SDK will be perfectly happy with the default configuration. The SDK logs a message at the DEBUG level if it can't find the file to help debug what's going wrong if you're expecting it to pick up an override config file but it's not for some reason. This message (and all of the other messages the SDK logs at the DEBUG level) are safe to ignore unless you're trying to figure out why something isn't working.

I would definitely recommend turning off DEBUG level logging before deploying to production - the DEBUG logs can get quite verbose.



来源:https://stackoverflow.com/questions/31171696/awssdk-config-override-json-file-not-found-exception-awssdk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!