Skip to content

Instantly share code, notes, and snippets.

<div id="vis"></div>
<input type="range" id="duration" name="duration" min="1" max="72" bind:value={value}>
<label for="duration">Duration</label>
Value: {value}
<script>
import * as vl from 'vega-lite-api';
import * as vega from 'vega';
import * as vegaLite from 'vega-lite';
@latesr
latesr / replication.ts
Last active November 30, 2021 16:24
AWS cdk for V1 ReplicatingBucket and ReplicaBucket supporting replication of 'soft-delete' and cross account configuration
//References:
//For permissions required for replication:
// https://docs.aws.amazon.com/AmazonS3/latest/dev/setting-repl-config-perm-overview.html
//To understand delete propagation and the differences between V1 and V2 replication:
// https://aws.amazon.com/blogs/storage/managing-delete-marker-replication-in-amazon-s3/
//
//Summary:
//This exposes:
// 1) Two classes that extend s3.Bucket (ReplicatingBucket and ReplicaBucket)
// 2) Two interfaces that extends s3.BucketProps (ReplicatingBucketProps and ReplicaBucketProps)
@latesr
latesr / s3replica-stack.ts
Last active June 16, 2020 14:31
AWS cdk for V1 bucket replication that propagates soft deletes
//References:
//For permissions required for replication:
// https://docs.aws.amazon.com/AmazonS3/latest/dev/setting-repl-config-perm-overview.html
//To understand delete propagation and the differences between V1 and V2 replication:
// https://aws.amazon.com/blogs/storage/managing-delete-marker-replication-in-amazon-s3/
//
//Summary:
//This creates:
// 1) Two private buckets (archive and replica)
// 2) A role with a policy supporting replication from archive to replica