Table of Contents

Class AmazonS3EncryptionClient

Namespace
Amazon.S3.Encryption
Assembly
AWSSDK.S3.dll

This class extends the AmazonS3Client and provides client side encryption when reading or writing S3 objects.

[Obsolete("This feature is in maintenance mode, no new updates will be released. Please transition to https://www.nuget.org/packages/Amazon.Extensions.S3.Encryption and see https://docs.aws.amazon.com/general/latest/gr/aws_sdk_cryptography.html for more information.")]
public class AmazonS3EncryptionClient : AmazonS3Client, IAmazonS3, IDisposable, ICoreAmazonS3, IAmazonService, IAmazonS3Encryption
Inheritance
AmazonS3EncryptionClient
Implements
ICoreAmazonS3
IAmazonService
Inherited Members

Constructors

AmazonS3EncryptionClient(RegionEndpoint, EncryptionMaterials)

Constructs AmazonS3EncryptionClient with the Encryption materials and credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.

Example App.config with credentials set.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <appSettings>
        <add key="AWSProfileName" value="AWS Default"/>
    </appSettings>
</configuration>
public AmazonS3EncryptionClient(RegionEndpoint region, EncryptionMaterials materials)

Parameters

region RegionEndpoint

The region to connect.

materials EncryptionMaterials

The encryption materials to be used to encrypt and decrypt envelope key.

AmazonS3EncryptionClient(AWSCredentials, RegionEndpoint, EncryptionMaterials)

Constructs AmazonS3EncryptionClient with AWS Credentials, Region and Encryption materials

public AmazonS3EncryptionClient(AWSCredentials credentials, RegionEndpoint region, EncryptionMaterials materials)

Parameters

credentials AWSCredentials

AWS Credentials

region RegionEndpoint

The region to connect.

materials EncryptionMaterials

The encryption materials to be used to encrypt and decrypt envelope key.

AmazonS3EncryptionClient(AWSCredentials, AmazonS3CryptoConfiguration, EncryptionMaterials)

Constructs AmazonS3EncryptionClient with AWS Credentials, AmazonS3CryptoConfiguration Configuration object and Encryption materials

public AmazonS3EncryptionClient(AWSCredentials credentials, AmazonS3CryptoConfiguration config, EncryptionMaterials materials)

Parameters

credentials AWSCredentials

AWS Credentials

config AmazonS3CryptoConfiguration

The AmazonS3EncryptionClient CryptoConfiguration Object

materials EncryptionMaterials

The encryption materials to be used to encrypt and decrypt envelope key.

AmazonS3EncryptionClient(AWSCredentials, EncryptionMaterials)

Constructs AmazonS3EncryptionClient with AWS Credentials and Encryption materials.

public AmazonS3EncryptionClient(AWSCredentials credentials, EncryptionMaterials materials)

Parameters

credentials AWSCredentials

AWS Credentials

materials EncryptionMaterials

The encryption materials to be used to encrypt and decrypt envelope key.

AmazonS3EncryptionClient(AmazonS3CryptoConfiguration, EncryptionMaterials)

Constructs AmazonS3EncryptionClient with the Encryption materials, AmazonS3 CryptoConfiguration object and credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.

Example App.config with credentials set.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <appSettings>
        <add key="AWSProfileName" value="AWS Default"/>
    </appSettings>
</configuration>
public AmazonS3EncryptionClient(AmazonS3CryptoConfiguration config, EncryptionMaterials materials)

Parameters

config AmazonS3CryptoConfiguration

The AmazonS3EncryptionClient CryptoConfiguration Object

materials EncryptionMaterials

The encryption materials to be used to encrypt and decrypt envelope key.

AmazonS3EncryptionClient(EncryptionMaterials)

Constructs AmazonS3EncryptionClient with the Encryption materials and credentials loaded from the application's default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance.

Example App.config with credentials set.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <appSettings>
        <add key="AWSProfileName" value="AWS Default"/>
    </appSettings>
</configuration>
public AmazonS3EncryptionClient(EncryptionMaterials materials)

Parameters

materials EncryptionMaterials

The encryption materials to be used to encrypt and decrypt envelope key.

AmazonS3EncryptionClient(string, string, RegionEndpoint, EncryptionMaterials)

Constructs AmazonS3EncryptionClient with AWS Access Key ID, AWS Secret Key, Region and Encryption materials

public AmazonS3EncryptionClient(string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region, EncryptionMaterials materials)

Parameters

awsAccessKeyId string

AWS Access Key ID

awsSecretAccessKey string

AWS Secret Access Key

region RegionEndpoint

The region to connect.

materials EncryptionMaterials

The encryption materials to be used to encrypt and decrypt envelope key.

AmazonS3EncryptionClient(string, string, AmazonS3CryptoConfiguration, EncryptionMaterials)

Constructs AmazonS3EncryptionClient with AWS Access Key ID, Secret Key, AmazonS3 CryptoConfiguration object and Encryption materials.

public AmazonS3EncryptionClient(string awsAccessKeyId, string awsSecretAccessKey, AmazonS3CryptoConfiguration config, EncryptionMaterials materials)

Parameters

awsAccessKeyId string

AWS Access Key ID

awsSecretAccessKey string

AWS Secret Access Key

config AmazonS3CryptoConfiguration

The AmazonS3EncryptionClient CryptoConfiguration Object

materials EncryptionMaterials

The encryption materials to be used to encrypt and decrypt envelope key.

AmazonS3EncryptionClient(string, string, EncryptionMaterials)

Constructs AmazonS3EncryptionClient with AWS Access Key ID, AWS Secret Key and Encryption materials

public AmazonS3EncryptionClient(string awsAccessKeyId, string awsSecretAccessKey, EncryptionMaterials materials)

Parameters

awsAccessKeyId string

AWS Access Key ID

awsSecretAccessKey string

AWS Secret Access Key

materials EncryptionMaterials

The encryption materials to be used to encrypt and decrypt envelope key.

AmazonS3EncryptionClient(string, string, string, RegionEndpoint, EncryptionMaterials)

Constructs AmazonS3EncryptionClient with AWS Access Key ID, Secret Key, SessionToken, Region and Encryption materials.

public AmazonS3EncryptionClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region, EncryptionMaterials materials)

Parameters

awsAccessKeyId string

AWS Access Key ID

awsSecretAccessKey string

AWS Secret Access Key

awsSessionToken string

AWS Session Token

region RegionEndpoint

The region to connect.

materials EncryptionMaterials

The encryption materials to be used to encrypt and decrypt envelope key.

AmazonS3EncryptionClient(string, string, string, AmazonS3CryptoConfiguration, EncryptionMaterials)

Constructs AmazonS3EncryptionClient with AWS Access Key ID, Secret Key, SessionToken AmazonS3EncryptionClient CryptoConfiguration object and Encryption materials.

public AmazonS3EncryptionClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonS3CryptoConfiguration config, EncryptionMaterials materials)

Parameters

awsAccessKeyId string

AWS Access Key ID

awsSecretAccessKey string

AWS Secret Access Key

awsSessionToken string

AWS Session Token

config AmazonS3CryptoConfiguration

The AmazonS3EncryptionClient CryptoConfiguration Object

materials EncryptionMaterials

The encryption materials to be used to encrypt and decrypt envelope key.

AmazonS3EncryptionClient(string, string, string, EncryptionMaterials)

Constructs AmazonS3EncryptionClient with AWS Access Key ID, Secret Key, SessionToken and Encryption materials.

public AmazonS3EncryptionClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, EncryptionMaterials materials)

Parameters

awsAccessKeyId string

AWS Access Key ID

awsSecretAccessKey string

AWS Secret Access Key

awsSessionToken string

AWS Session Token

materials EncryptionMaterials

The encryption materials to be used to encrypt and decrypt envelope key.

Properties

SupportResponseLogging

Turn off response logging because it will interfere with decrypt of the data coming back from S3.

protected override bool SupportResponseLogging { get; }

Property Value

bool

Methods

CustomizeRuntimePipeline(RuntimePipeline)

Customize the pipeline to allow encryption.

protected override void CustomizeRuntimePipeline(RuntimePipeline pipeline)

Parameters

pipeline RuntimePipeline

Dispose(bool)

Dispose this instance

protected override void Dispose(bool disposing)

Parameters

disposing bool