AWS的文档系统真是烂到家了!!!!!
To connect to any of the supported services with the AWS SDK for Java, you must provide AWS credentials. The AWS SDKs and CLIs use provider chains to look for AWS credentials in a number of different places, including system/user environment variables and local AWS configuration files.
This topic provides basic information about setting up your AWS credentials for local application development using the AWS SDK for Java. If you need to set up credentials for use within an EC2 instance or if you're using the Eclipse IDE for development, refer to the following topics instead:
- When using an EC2 instance, create an IAM role and then give your EC2 instance access to that role as shown in Using IAM Roles to Grant Access to AWS Resources on Amazon EC2.
- Set up AWS credentials within Eclipse using the AWS Toolkit for Eclipse. See Set up AWS Credentials in theAWS Toolkit for Eclipse User Guide for more information.