Java tutorial
/* * Copyright 2014-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Amazon Software License (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/asl/ * * or in the "license" file accompanying this file. * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and limitations under the License. */ package com.amazon.kinesis.streaming.agent; import com.amazon.kinesis.streaming.agent.config.AgentConfiguration; import com.amazonaws.auth.AWSCredentialsProviderChain; import com.amazonaws.auth.ContainerCredentialsProvider; import com.amazonaws.auth.EnvironmentVariableCredentialsProvider; import com.amazonaws.auth.InstanceProfileCredentialsProvider; import com.amazonaws.auth.SystemPropertiesCredentialsProvider; import com.amazonaws.auth.profile.ProfileCredentialsProvider; public class AgentAWSCredentialsProviderChain extends AWSCredentialsProviderChain { public AgentAWSCredentialsProviderChain(AgentConfiguration config) { super(new AgentAWSCredentialsProvider(config), new EnvironmentVariableCredentialsProvider(), new SystemPropertiesCredentialsProvider(), new ContainerCredentialsProvider(), new ProfileCredentialsProvider(), new InstanceProfileCredentialsProvider()); } }