{"id":14108804,"url":"https://github.com/scaleway/serverless-scaleway-functions","last_synced_at":"2025-12-29T23:54:53.214Z","repository":{"id":37431981,"uuid":"192755684","full_name":"scaleway/serverless-scaleway-functions","owner":"scaleway","description":"Plugin for Serverless Framework to allow users to deploy their serverless applications on Scaleway Functions","archived":false,"fork":false,"pushed_at":"2025-06-16T19:45:03.000Z","size":2005,"stargazers_count":81,"open_issues_count":24,"forks_count":24,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-06-22T07:48:50.677Z","etag":null,"topics":["cloud","faas","function","functions","provider","scalable","scale","scaleway","serverless","serverless-framework"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scaleway.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-06-19T15:08:52.000Z","updated_at":"2025-05-21T15:49:54.000Z","dependencies_parsed_at":"2024-06-28T13:59:50.909Z","dependency_job_id":"67c19f11-aefa-4e84-8633-912aac982b3f","html_url":"https://github.com/scaleway/serverless-scaleway-functions","commit_stats":{"total_commits":123,"total_committers":25,"mean_commits":4.92,"dds":0.6910569105691057,"last_synced_commit":"744f0ed5087c80ccc37fc67d07fd21056a4208f2"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/scaleway/serverless-scaleway-functions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scaleway%2Fserverless-scaleway-functions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scaleway%2Fserverless-scaleway-functions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scaleway%2Fserverless-scaleway-functions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scaleway%2Fserverless-scaleway-functions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scaleway","download_url":"https://codeload.github.com/scaleway/serverless-scaleway-functions/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scaleway%2Fserverless-scaleway-functions/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268185559,"owners_count":24209392,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloud","faas","function","functions","provider","scalable","scale","scaleway","serverless","serverless-framework"],"created_at":"2024-08-14T10:01:48.366Z","updated_at":"2025-12-29T23:54:53.206Z","avatar_url":"https://github.com/scaleway.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Scaleway plugin for Serverless Framework\n\nPlugin for using Scaleway [Serverless Functions](https://www.scaleway.com/en/serverless-functions/) and [Serverless Containers](https://www.scaleway.com/en/serverless-containers/) with [Serverless Framework](https://github.com/oss-serverless/serverless).\n\n## Requirements\n\n- [Serverless Framework v3 compatible CLI](https://github.com/oss-serverless/serverless) installed on your local computer (e.g. run `npm install -g osls`).\n\nIf you are using [Scaleway IAM](https://www.scaleway.com/en/iam/), you need to be the Owner of the Scaleway Organization in which the deployment will take place, or be an IAM user of the Organization with a policy granting you the necessary Permission Sets. See the [IAM Overview](https://www.scaleway.com/en/docs/identity-and-access-management/iam/reference-content/overview/) for more information.\n\n## Quick start\n\n1. Export the template you wish to use (see the list [here](https://github.com/scaleway/serverless-scaleway-functions/tree/master/examples)). We will use `python3`:\n\n```shell\nexport TEMPLATE=python3\n```\n\n2. Create a function from this template:\n\n```shell\nserverless create \\\n  --path ${TEMPLATE}-func \\\n  --template-url https://github.com/scaleway/serverless-scaleway-functions/tree/master/examples/${TEMPLATE}\n```\n\n3. Install dependencies:\n\n```shell\ncd ${TEMPLATE}-func\nnpm i\n```\n\n4. Deploy the function:\n\n```shell\nserverless deploy\n```\n\n5. Invoke the function (note that `first` is the function name in this example):\n\n```shell\nserverless invoke --function first\n```\n\n## Contents\n\n- [Quick start](#quick-start)\n- [Configuration](#configuration)\n- [Supported commands](#supported-commands)\n- [Unsupported commands](#unsupported-commands)\n- [Useful links](#useful-links)\n- [Contributing](#contributing)\n- [License](#license)\n\nMore detailed documentation can be found in the [`docs`](docs/) folder, including:\n\n- [Managing containers](docs/containers.md)\n- [Configuring custom domains](docs/custom-domains.md)\n- [Handling events (e.g. CRONs)](docs/events.md)\n- [Security and secret management](docs/secrets.md)\n- [Troubleshooting](docs/troubleshooting.md)\n\nThere are also language-specific notes for Serverless Functions:\n\n- [Golang functions](docs/golang.md)\n- [Javascript functions](docs/javascript.md)\n- [PHP functions](docs/php.md)\n- [Python functions](docs/python.md)\n- [Rust functions](docs/rust.md)\n\n## Configuration\n\nWith Serverless Framework, your functions and containers are defined in a `serverless.yml` file.\n\nEach `serverless.yml` file corresponds to one function _or_ container namespace.\n\n### General configuration\n\nThe following configuration is common to both functions and containers:\n\n```yaml\n# The name of your namespace\nservice: my-namespace\n\n# Read environment variables from a .env file\nuseDotenv: false\n\n# Use of this plugin. This must not be changed\nplugins:\n  - serverless-scaleway-functions\n\n# Scaleway-specific configuration\nprovider:\n  # Must not change\n  name: scaleway\n\n  # Runtime used for functions (unless overridden)\n  # List: https://www.scaleway.com/en/docs/serverless/functions/reference-content/functions-lifecycle/#available-runtimes\n  runtime: python310\n\n  # Global environment variables, used in every function/container in this namespace\n  env:\n    MY_VAR: \"some var\"\n    MY_OTHER_VAR: \"some other var\"\n\n  # Global secrets, used in every function/container in this namespace\n  secret:\n    MY_SECRET: \"some secret\"\n    MY_OTHER_SECRET: \"some other secret\"\n\n  # Optional override of Scaleway credentials\n  scwToken: \u003cscw-token\u003e\n  scwProject: \u003cscw-project-id\u003e\n\n  # Scaleway region for the deploy\n  scwRegion: fr-par\n\n# Include/exclude directories\npackage:\n  patterns:\n    - \"!node_modules/**\"\n    - \"!.gitignore\"\n    - \"!.git/**\"\n```\n\n### Function-specific configuration\n\nTo define functions, you can include a `functions` block:\n\n```yaml\nfunctions:\n  my-func:\n    # Handler entrypoint\n    handler: handler.py\n\n    # Minimum and maximum number of instances\n    minScale: 0\n    maxScale: 10\n\n    # Memory limit (in MiB)\n    # Limits: https://www.scaleway.com/en/docs/serverless/functions/reference-content/functions-limitations/\n    memoryLimit: 1024\n\n    # Maximum duration a request will wait to be served before it times out (in seconds)\n    # Value in string format ex: \"300s\" (default: 300 seconds)\n    timeout: 300s\n\n    # Runtime for this function, allows overriding provider.runtime\n    runtime: node20\n\n    # How to handle HTTP. Options: enabled (allow HTTP), or redirected (redirect HTTP -\u003e HTTPS)\n    httpOption: enabled\n\n    # Execution environment to use when running the function. Options: v1 (legacy), v2 (recommended, with improved cold starts)\n    sandbox: v2\n\n    # Controls privacy of the function. Options: public (no authentication), private (token-based authentication)\n    privacy: public\n\n    # Local environment variables, used only in this function\n    env:\n      LOCAL_VAR: \"local var\"\n\n    # Local secrets, used only in this function\n    secret:\n      LOCAL_SECRET: \"local secret\"\n\n    # Custom domains configured for the function\n    # https://www.scaleway.com/en/docs/compute/functions/how-to/add-a-custom-domain-name-to-a-function/\n    custom_domains:\n      - my-func.some.domain.com\n\n    # List of events to trigger the function\n    events:\n      - schedule:\n          rate: \"1 * * * *\"\n          # Data passed as input in the request\n          input:\n            key-a: \"value-a\"\n            key-b: \"value-b\"\n\n    # ID of the private network to attach the function to\n    privateNetworkId: \"3fd741d4-f686-4afc-bcea-d720c695748f\"\n```\n\n### Container-specific configuration\n\nTo define containers, you can include a `custom.containers` block (note that you can only have `functions` _or_ `custom.containers`).\n\n```yaml\ncustom:\n  containers:\n    my-container:\n      # Subdirectory holding the Dockerfile, cannot be used with registryImage\n      directory: container/\n\n      # Name of the registry image, cannot be used with directory\n      registryImage: nginx:latest\n\n      # Minimum and maximum number of instances\n      minScale: 0\n      maxScale: 10\n\n      # Configuration used to decide when to scale the container up or down\n      scalingOption:\n        # Can be one of: concurrentRequests, cpuUsage, memoryUsage\n        type: concurrentRequests\n        # Value to trigger scaling up\n        # It's expressed in:\n        # - concurrentRequests: number of requests\n        # - cpuUsage: percentage of CPU usage\n        # - memoryUsage: percentage of memory usage\n        # Note that cpu and memory scaling are only available for minScale \u003e= 1 containers\n        threshold: 50\n\n      # Memory limit (in MiB)\n      # Limits: https://www.scaleway.com/en/docs/serverless/containers/reference-content/containers-limitations/\n      memoryLimit: 1024\n\n      # CPU limit for the container in mvCPU, chosen based on resource tiers if not set\n      # Limits and tiers: https://www.scaleway.com/en/docs/serverless/containers/reference-content/containers-limitations/\n      cpuLimit: 1000\n\n      # Maximum duration a request will wait to be served before it times out (in seconds)\n      # Value in string format ex: \"300s\" (default: 300 seconds)\n      timeout: 300s\n\n      # How to handle HTTP. Options: enabled (allow HTTP), or redirected (redirect HTTP -\u003e HTTPS)\n      httpOption: enabled\n\n      # Execution environment to use when running the container. Options: v1 (legacy), v2 (recommended, with improved cold starts)\n      sandbox: v2\n\n      # Controls privacy of the container. Options: public (no authentication), private (token-based authentication)\n      privacy: public\n\n      # Local environment variables, used only in this container\n      env:\n        LOCAL_VAR: \"local var\"\n\n      # Local secrets, used only in this container\n      secret:\n        LOCAL_SECRET: \"local secret\"\n\n      # Custom domains configured for the function\n      # https://www.scaleway.com/en/docs/serverless/containers/how-to/add-a-custom-domain-to-a-container/\n      custom_domains:\n        - my-container.some.domain.com\n\n      # Health check configuration\n      healthCheck:\n        type: http # Or tcp if you only want to check that the port is open\n        httpPath: /health\n        interval: 10s\n        failureThreshold: 3\n\n      # List of events to trigger the container\n      events:\n        - schedule:\n            rate: \"1 * * * *\"\n            # Data passed as input in the request\n            input:\n              key-a: \"value-a\"\n              key-b: \"value-b\"\n\n      # Deprecated: number of simultaneous requests to handle\n      # Please use scalingOption of type concurrentRequests instead\n      # maxConcurrency: 20\n\n      # ID of the private network to attach the container to\n      privateNetworkId: \"3fd741d4-f686-4afc-bcea-d720c695748f\"\n```\n\n## Supported commands\n\n### `serverless deploy`\n\nNote that by default `serverless deploy` applies the configuration located in your `serverless.yml` and removes functions in that namespace that are not in the file.\n\nThis can be switched off by setting the `singleSource` option to `false`.\n\n### `serverless logs`\n\n\u003e [!WARNING]\n\u003e This command is deprecated and will be removed on March 12, 2024. Please refer to the documentation (for [functions](https://www.scaleway.com/en/developers/api/serverless-functions/#logs) and [containers](https://www.scaleway.com/en/developers/api/serverless-functions/#logs)) to continue getting your logs.\n\u003e TL;DR: You can still access function and container logs conveniently via the [Cockpit](https://www.scaleway.com/en/docs/observability/cockpit/how-to/access-grafana-and-managed-dashboards/) interface. Dedicated dashboards called \"Serverless Functions Logs\" and \"Serverless Containers Logs\" are accessible there.\n\nThe `serverless logs` command lets you watch the logs of a specific function or container.\n\nYou can fetch the logs of a specific function for with the `--function` option. You must specify the name of your function in the command.\n\n```bash\nserverless logs --function \u003cfunction_or_container_name\u003e\n```\n\n### `serverless info`\n\nThe `serverless info` command gives you information about your functions' or containers' current deployement state in JSON format.\n\n## Unsupported commands\n\n### `serverless invoke local`\n\n`serverless invoke local` is **not supported** directly but instead we provide additional packages to install close to your handler.\n\nDocumentation is available through runtimes frameworks for:\n\n- [Go](https://github.com/scaleway/serverless-functions-go)\n- [Python](https://github.com/scaleway/serverless-functions-python)\n- [Node](https://github.com/scaleway/serverless-functions-node)\n\n## Useful links\n\n- [Scaleway Serverless Functions Documentation](https://www.scaleway.com/en/docs/compute/functions/api-cli/fun-uploading-with-serverless-framework/)\n- [Scaleway Serverless Containers Documentation](https://www.scaleway.com/en/docs/compute/containers/api-cli/cont-uploading-with-serverless-framework/)\n- [Serverless Framework documentation](https://github.com/oss-serverless/serverless)\n- [Scaleway Serverless example projects](https://github.com/scaleway/serverless-examples)\n\n## Contributing\n\nThis plugin is developed and maintained by the `Scaleway Serverless Team`, but we welcome pull requests and issues, and are available to chat on our [Community Slack Channels](https://scaleway-community.slack.com/): #serverless-containers and #serverless-functions.\n\nIf you are looking for a way to contribute please read [CONTRIBUTING.md](./.github/CONTRIBUTING.md). You can also look at the [development documentation](docs/development.md).\n\n## Help \u0026 support\n\n- Scaleway support is available on Scaleway Console.\n- Additionally, you can join our [Slack Community](https://www.scaleway.com/en/docs/tutorials/scaleway-slack-community/)\n\n## Reach Us\n\nWe love feedback. Feel free to:\n\n- Open a [Github issue](https://github.com/scaleway/serverless-scaleway-functions/issues/new)\n- Send us a message on the [Scaleway Slack community](https://slack.scaleway.com/), in the\n  [#serverless-functions](https://scaleway-community.slack.com/app_redirect?channel=serverless-functions) channel.\n\n## License\n\nThis project is MIT licensed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscaleway%2Fserverless-scaleway-functions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscaleway%2Fserverless-scaleway-functions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscaleway%2Fserverless-scaleway-functions/lists"}