Search in sources :

Example 61 with AWSCredentials

use of com.amazonaws.auth.AWSCredentials in project ignite-extensions by apache.

the class S3CheckpointSpiStartStopBucketEndpointSelfTest method spiConfigure.

/**
 * {@inheritDoc}
 */
@Override
protected void spiConfigure(S3CheckpointSpi spi) throws Exception {
    AWSCredentials cred = new BasicAWSCredentials(IgniteS3TestSuite.getAccessKey(), IgniteS3TestSuite.getSecretKey());
    spi.setAwsCredentials(cred);
    spi.setBucketNameSuffix(S3CheckpointSpiSelfTest.getBucketNameSuffix() + "-e");
    spi.setBucketEndpoint("s3.us-east-2.amazonaws.com");
    super.spiConfigure(spi);
}
Also used : BasicAWSCredentials(com.amazonaws.auth.BasicAWSCredentials) AWSCredentials(com.amazonaws.auth.AWSCredentials) BasicAWSCredentials(com.amazonaws.auth.BasicAWSCredentials)

Example 62 with AWSCredentials

use of com.amazonaws.auth.AWSCredentials in project ignite-extensions by apache.

the class S3CheckpointSpiStartStopSSEAlgorithmSelfTest method spiConfigure.

/**
 * {@inheritDoc}
 */
@Override
protected void spiConfigure(S3CheckpointSpi spi) throws Exception {
    AWSCredentials cred = new BasicAWSCredentials(IgniteS3TestSuite.getAccessKey(), IgniteS3TestSuite.getSecretKey());
    spi.setAwsCredentials(cred);
    spi.setBucketNameSuffix(S3CheckpointSpiSelfTest.getBucketNameSuffix());
    spi.setSSEAlgorithm("AES256");
    super.spiConfigure(spi);
}
Also used : BasicAWSCredentials(com.amazonaws.auth.BasicAWSCredentials) AWSCredentials(com.amazonaws.auth.AWSCredentials) BasicAWSCredentials(com.amazonaws.auth.BasicAWSCredentials)

Example 63 with AWSCredentials

use of com.amazonaws.auth.AWSCredentials in project ignite-extensions by apache.

the class S3CheckpointSpiStartStopSelfTest method spiConfigure.

/**
 * {@inheritDoc}
 */
@Override
protected void spiConfigure(S3CheckpointSpi spi) throws Exception {
    AWSCredentials cred = new BasicAWSCredentials(IgniteS3TestSuite.getAccessKey(), IgniteS3TestSuite.getSecretKey());
    spi.setAwsCredentials(cred);
    spi.setBucketNameSuffix(S3CheckpointSpiSelfTest.getBucketNameSuffix());
    super.spiConfigure(spi);
}
Also used : BasicAWSCredentials(com.amazonaws.auth.BasicAWSCredentials) AWSCredentials(com.amazonaws.auth.AWSCredentials) BasicAWSCredentials(com.amazonaws.auth.BasicAWSCredentials)

Example 64 with AWSCredentials

use of com.amazonaws.auth.AWSCredentials in project ignite-extensions by apache.

the class S3SessionCheckpointSelfTest method testS3Checkpoint.

/**
 * @throws Exception If failed.
 */
@Ignore("https://issues.apache.org/jira/browse/IGNITE-2420")
@Test
public void testS3Checkpoint() throws Exception {
    IgniteConfiguration cfg = getConfiguration();
    S3CheckpointSpi spi = new S3CheckpointSpi();
    AWSCredentials cred = new BasicAWSCredentials(IgniteS3TestSuite.getAccessKey(), IgniteS3TestSuite.getSecretKey());
    spi.setAwsCredentials(cred);
    spi.setBucketNameSuffix(S3CheckpointSpiSelfTest.getBucketNameSuffix());
    cfg.setCheckpointSpi(spi);
    GridSessionCheckpointSelfTest.spi = spi;
    checkCheckpoints(cfg);
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) BasicAWSCredentials(com.amazonaws.auth.BasicAWSCredentials) AWSCredentials(com.amazonaws.auth.AWSCredentials) BasicAWSCredentials(com.amazonaws.auth.BasicAWSCredentials) Ignore(org.junit.Ignore) GridSessionCheckpointSelfTest(org.apache.ignite.session.GridSessionCheckpointSelfTest) Test(org.junit.Test) GridSessionCheckpointAbstractSelfTest(org.apache.ignite.session.GridSessionCheckpointAbstractSelfTest)

Example 65 with AWSCredentials

use of com.amazonaws.auth.AWSCredentials in project stream-applications by spring-cloud.

the class S3SourceTests method initS3.

@BeforeAll
static void initS3() {
    AWSCredentials credentials = new BasicAWSCredentials("minio", "minio123");
    ClientConfiguration clientConfiguration = new ClientConfiguration();
    s3Client = AmazonS3ClientBuilder.standard().withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration("http://localhost:" + minio.getMappedPort(9000), Regions.US_EAST_1.name())).withPathStyleAccessEnabled(true).withClientConfiguration(clientConfiguration).withCredentials(new AWSStaticCredentialsProvider(credentials)).build();
}
Also used : AWSStaticCredentialsProvider(com.amazonaws.auth.AWSStaticCredentialsProvider) AWSCredentials(com.amazonaws.auth.AWSCredentials) BasicAWSCredentials(com.amazonaws.auth.BasicAWSCredentials) BasicAWSCredentials(com.amazonaws.auth.BasicAWSCredentials) ClientConfiguration(com.amazonaws.ClientConfiguration) BeforeAll(org.junit.jupiter.api.BeforeAll)

Aggregations

AWSCredentials (com.amazonaws.auth.AWSCredentials)277 BasicAWSCredentials (com.amazonaws.auth.BasicAWSCredentials)181 AWSStaticCredentialsProvider (com.amazonaws.auth.AWSStaticCredentialsProvider)80 Test (org.junit.Test)57 ClientConfiguration (com.amazonaws.ClientConfiguration)53 AWSCredentialsProvider (com.amazonaws.auth.AWSCredentialsProvider)49 AmazonS3Client (com.amazonaws.services.s3.AmazonS3Client)33 AmazonS3 (com.amazonaws.services.s3.AmazonS3)30 AmazonClientException (com.amazonaws.AmazonClientException)29 BasicSessionCredentials (com.amazonaws.auth.BasicSessionCredentials)26 ProfileCredentialsProvider (com.amazonaws.auth.profile.ProfileCredentialsProvider)15 HashMap (java.util.HashMap)15 AnonymousAWSCredentials (com.amazonaws.auth.AnonymousAWSCredentials)14 IOException (java.io.IOException)14 AmazonServiceException (com.amazonaws.AmazonServiceException)13 AwsClientBuilder (com.amazonaws.client.builder.AwsClientBuilder)13 Date (java.util.Date)13 SdkClientException (com.amazonaws.SdkClientException)11 AWSSessionCredentials (com.amazonaws.auth.AWSSessionCredentials)11 PropertiesCredentials (com.amazonaws.auth.PropertiesCredentials)11