Skip to content

Instantly share code, notes, and snippets.

@TerribleDev
Last active January 19, 2016 12:33
Show Gist options
  • Save TerribleDev/9421c16280cdc04ca80f to your computer and use it in GitHub Desktop.
Save TerribleDev/9421c16280cdc04ca80f to your computer and use it in GitHub Desktop.
uploading to S3
public async Task UploadArtifact(S3Config config, IAmazonS3 s3Client)
{
using(var utility = new TransferUtility(s3Client))
{
Console.WriteLine($"Uploading artifact {config.ArtifactRelativePath} {config.Key}");
await utility.UploadAsync(filePath: config.ArtifactRelativePath, bucketName: config.S3Bucket, key: config.Key);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment