Skip to content

Infra Requirements #8

@talkol

Description

@talkol

Deployment Through Git

  • Devs should git fork the template repo and push their master branch to deploy to production.
  • Devs should not be required to log into AWS console unless debugging edge issues.
  • Use Github Actions not circle CI.
  • Use serverless framework free / open source version.

Status: done (needs review)

Persistence

  • Let devs write to file system using EFS.
  • Working with EFS on AWS should not disrupt the function's outgoing connections to the Internet (known VPC issues).
  • Optional: arrange an easy way to browse EFS from the dev laptop or through AWS console.

Status: done (needs review, without the optional)

Typescript Support

  • Template repo code should be TypeScript (es6 imports and exports, no requires and no module.exports).
  • Change handler.js to handler.ts and put it in src directory.
  • Build should bundle into a single tree shaked JS file (with webpack).
  • Optional: move to ncc instead of configuring webpack manually.
  • Debugging: The ability to debug the type script file in webstorm & VScode

Status: done (needs review, without the optional)

Local Manual Testing

  • Let devs run their functions locally to play with it through npm script that takes function name as argument.
  • Rely on invoke local to implement the above since serverless already invested effort here.
  • Local run should use local file system, not EFS.

Status: not done

E2E Automated Test

  • Write an example simple E2E test in TypeScript that runs the function.
  • Connect the E2E suite to CI.

Status: not done

Logging

  • Let devs console.log from their function and have the log data available on CloudWatch.
  • Verify that stack traces on JS errors are meaningful, it's ok not to minify the source to achieve this.
  • Optional: use a tool to help devs give meaning to minified stack traces.
  • Optional: change the default CloudWatch log retention to 90 days.

Status: done (needs review, without the optional)

Custom Metrics

  • Choose time series DB to hold the custom metrics (probably InfluxDB - check with @uv-orbs).
  • Give devs a simple function to call in order to report the custom metrics through HTTP.
  • Configure grafana to display the custom metrics.

Status: not done

Security

  • Configure a simple method to send secrets to the function, can either use Github Repo Secret as environment variables or connect to AWS Secrets Manager.
  • Reduce permissions of the CI AWS user that deploys the functions to a minimum.

Status: not done

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions