an RDS cluster • Goals • One click access to requested data • Should not be perpetual or require complicated logins • Ideally, it should be cleaned up automatically
• Local testing only covers so much • RDS snapshots are a pain • Single-AZ DB will result in suspended I/O • Snapshots can’t be exported to anything except RDS • MultiAZ DB export with mysqldump was ok • No compute instances, how do we get the data out? • Repeat multiple times, lot of wasted time
an instance • Wait for instance to be ready • Fumble with SSH keys • Fumble with mysqldump command • Wait for data to be exported • Fumble with scp • Where to store the data export and how long?
equivalent of mysqldump • Wasted time in re-engineering the equivalent of mysqldump • Add mysqldump binary to package • system(“mysqldump…”) • Eh… • Problems? • Lambda limits to only 512 MB on /tmp • Lambda runtime limits(15 minutes currently, was 5 minutes earlier)
for Amazon ECS that allows you to run containers without having to manage servers or clusters”) • ECS mode – “Fargate launch type” • No cluster* to manage, no nodes to run • Provide a Docker image, CPU & memory specs • Define networking, IAM • Launch a task *you still must create a “cluster” but don’t have to manage infra
Docker image) • Private registries supported • Run in VPC • Invoke when required • Per usage billing • Starts from image pull, ends until task terminates • Run as task instead of service • Let the container exit when done • Save on costs • Export logs to CloudWatch, Splunk, FireLens, fluentd • Higher ephemeral storage space
anyone?) • Minimum billing is 1 minute • Savings Plans brings reservations but no spot prices NEW! Fargate Spot now GA • Environment variable values listed on AWS Console • Use SSM Parameter store for secrets • Play CPU/Memory combo bingo • No support for persistent storage(or EBS/EFS) yet, but on the roadmap • https://github.com/aws/containers-roadmap/issues/53 • https://github.com/aws/containers-roadmap/issues/64
• Spin up instance and wait for instance to be ready: 2 minutes • Fumble with the right set of SSH keys: 2 minutes • SSH to bastion: 10 seconds • Alerts fired, investigate: 5 minutes • Lunch time!
• Recall why did I connect to instance? • Find out the right set of Database host and credentials: 10 minutes • Run the command: 2 seconds • Get the command wrong and search for the right command: 5 minutes • Phew, command worked. • Try to SCP the file out: 5 minutes • Realize you can’t share the file and copy to S3: 2 minutes
click access to requested data • Should not be perpetual or require complicated logins but still be “secure enough” • Data exports should be cleaned up automatically.
but offers quite a bit of features • Upload data exports to a private bucket • Generate a pre-signed URL valid for an hour • Setup lifecycle policies to expire out the objects after a day. • Goals • One click access to requested data • Should not be perpetual or require complicated logins • Ideally, it should be cleaned up automatically