🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@yandex-cloud/serverless-plugin

Package Overview
Dependencies
Maintainers
0
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yandex-cloud/serverless-plugin

Provider plugin for the Serverless Framework which adds support for Yandex Cloud Functions.

latest
Source
npmnpm
Version
1.7.25
Version published
Maintainers
0
Created
Source

npm License

Serverless Yandex Cloud Functions Plugin

This plugin enables support for Yandex Cloud Functions within the Serverless Framework.

Quick Start

First you need to install the serverless command-line tool. Check the official getting started guide. Fastest way to do this is to use npm:

npm install serverless -g

Now you can create new project from template provided by this plugin:

serverless create \
  --template-url https://github.com/yandex-cloud/serverless-plugin/tree/master/templates/nodejs

Before you deploy your first functions using Serverless, you need to configure Yandex.Cloud credentials. There are two ways to do it:

  • Install the yc command-line tool and use the setup wizard to provide all required parameters. All required guides and in-depth documentation is available at Yandex.Cloud website.
  • Provide YC_OAUTH_TOKEN (or YC_IAM_TOKEN), YC_CLOUD_ID and YC_FOLDER_ID environment variables
  • If you are going to create/edit YMQ or S3 buckets, you need to provide AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY environment variables. How to create static access keys

To deploy your project use:

serverless deploy

To invoke (test) your function:

serverless invoke -f simple

To remove all deployed resources:

serverless remove

Configuration variables from Lockbox

This plugin adds configuration variable source, which allows to retrieve secrets from Lockbox. Usage example:

functions:
  simple:
    handler: dist/index.hello
    memorySize: 128
    timeout: '5'
    account: function-sa
    environment:
      DB_PASSWORD: ${lockbox:<lockbox_secret_id>/<lockbox_secret_key>}

Environment Variables

API Endpoints

  • S3_ENDPOINT
  • SQS_ENDPOINT
  • YC_ENDPOINT

AWS Access Key (for YMQ and Object Storage manipulations)

  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY

Cloud API Authentication

  • YC_OAUTH_TOKEN_ENV
  • YC_IAM_TOKEN_ENV
  • YC_CLOUD_ID
  • YC_FOLDER_ID

Supported resources

  • Cloud Functions
  • Triggers
  • Service Accounts
  • Container Registries
  • Message Queues
  • S3 Buckets

Keywords

yandex-cloud

FAQs

Package last updated on 23 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts