Skip to content

Allow specification of s3 bucket to backup plugins #9

@martinheidegger

Description

@martinheidegger

Currently the installation process will always go and look in npm to install the packages. This is necessary to receive updates for plugins but it also adds an inherent vulnerability. If npm happens to be down the service using lambda-plugins will be down as well. Thus, it would be an important feature to be able to specify an s3-bucket to which installed plugins should be downloaded to and from.

loadPlugins([...], {
  backup: 's3://...'
})

This means that once a new version is installed, the system should upload the installation path (as .tgz) to s3 and if an error during installation occurs it should download it from the same s3 path.

[request]
→ does /tmp/plugins exist?
 Yes → was updated within the last 2 minutes?
 |  Yes → start
 |  No  → is /tmp/plugins is up-to-date?
 |     Yes → start
 |     No -\  
 |         |→ load plugins
 |         \→ is load successful?
 |           Yes -\
 |           |   |→ upload to s3 backup
 |           |   \→ start
 |           No → -\
 |               |→ install from s3 backup
 |               \→ start
 No -\
     |→ load plugins
     \→ is load successful?
       Yes -\
       |   |→ upload to s3 backup
       |   \→ start
       No → -\
           |→ install from s3 backup
           \→ start

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions