Skip to content

Instantly share code, notes, and snippets.

// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Net;
using System.Linq;
using Microsoft.Net.Http.Headers;
using Microsoft.AspNetCore.Http;
var S3 = require('aws-sdk/clients/s3');
process.env.AWS_PROFILE = 'default';
var s3client = new S3();
var fromBucket = 'mysourcebucket';
var toBucket = 'mydestinationbucket';
var dryrun = false;
const delay = ms => new Promise(res => setTimeout(res, ms));