Storage and Deno and database seeding, oh my!

avatar
Simon MacDonald
March 28, 2022

We’ve recently released some updates to Begin to make your developer experience even better, and we’ve decided we need to celebrate them.

Ephemeral Storage

AWS officially announced ephemeral storage, which is a feature we’ve been waiting on for quite a while.

Before ephemeral storage, your lambda’s were limited to 512 MB for the /tmp disk. While this is more than enough space for most workflows, some of you like to use frameworks that install many dependencies. We’ve updated Begin so that all apps are configured to have 2048 MB of storage by default. The increased storage will help some of you avoid the dreaded ENOSPC: no space left on device, write error.

Folks that use Architect to deploy their apps directly to AWS will be able to configure this setting using the storage pragma.

@aws
storage 5000 # in MB

Additional disk space will unlock a bunch of new uses cases for functional web apps.

Deno 1.20.2 Support

We’ve rolled out support for Deno runtime version 1.20.2 and quickly followed up with 1.20.3 to Begin. We also open-sourced the Begin Deno runtime Lambda Layer for those interested in bringing Deno to AWS Lambda themselves.

Click the button below to deploy your first Deno app with Begin.

deploy-to-begin

Please reach out via our support channel if you run into any problems.

Seeding the database in Architect sandbox

Architect now supports seeding data to your database in the testing environment. This feature is not enabled for staging or production to avoid accidentally overwriting data in a live application.

To use it, add a sandbox-seed.js or sandbox-seed.json file to the root of your project.

Your seed data should be an object whose properties correspond to @tables names, and have arrays of rows to seed. For example:

@tables
things
  id *String
  sort **String
// seed-data.js
module.exports = {
  things: [
    {
      id: 'foo',
      sort: 'bar',
      arbitrary: 'data',
    },
    {
      id: 'fiz',
      sort: 'buz',
      arbitrary: 'info',
    }
  ]
}