https://github.com/hyperbrain/serverless-vscode
Serverless framework integration for VSCode
https://github.com/hyperbrain/serverless-vscode
serverless serverless-framework vscode vscode-extension
Last synced: about 1 year ago
JSON representation
Serverless framework integration for VSCode
- Host: GitHub
- URL: https://github.com/hyperbrain/serverless-vscode
- Owner: HyperBrain
- License: mit
- Created: 2017-12-25T14:09:28.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-07T11:33:58.000Z (almost 8 years ago)
- Last Synced: 2025-03-18T22:09:49.173Z (about 1 year ago)
- Topics: serverless, serverless-framework, vscode, vscode-extension
- Language: TypeScript
- Size: 144 KB
- Stars: 28
- Watchers: 3
- Forks: 3
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
## Serverless Framework integration for VS Code
[](https://marketplace.visualstudio.com/items?itemName=frankschmid.serverless-vscode)
[](https://marketplace.visualstudio.com/items?itemName=frankschmid.serverless-vscode)
[](https://marketplace.visualstudio.com/items?itemName=frankschmid.serverless-vscode)
This extension enables an integration of Serverless projects with VSCode. It eliminates the need
to start Serverless commands from a separate command line.
## Installation
In order to install an extension you need to open the extension palette and search for serverless-vscode.
You can then install it.
**Currently the extension only supports Serverless projects with Serverless installed locally!**
That means, that Serverless must be a development dependency of the project itself. A subsequent
version of the extension will also support the globally installed Serverless framework and a
configuration for that.
## Configuration
The extension supports user and workspace configuration. To access the configuration settings,
open `File->Preferences->Settings` (workspace or user) and expand the `Serverless Configuration` node.
The following configuration settings are available:
### serverless.aws.askForRegion
When set to false (the default), the extension will not ask for the region to deploy to but use the
one, set as `serverless.aws.defaultRegion`. This reduces the typing needed to execute a single
command, as normally you'll not deploy cross-region that often.
### serverless.aws.defaultStage
The defult stage that is assumed, if you just press ENTER in the stage input field when executing a command.
### serverless.aws.defaultRegion
The defult region that is assumed, if you just press ENTER in the stage input field when executing a command. See also `serverless.aws.askForRegion`.
## Usage
### The Serverless outline
As soon as you have added a Serverless project to your workspace, you can select the `serverless.yml`
in the Explorer tree view. Then an outline is shown in the Explorer view, that shows the parsed
structure of your Serverless service definition.
The outline will contain a `functions` and an `API` hive, which contain the defined functions in the
project and the defined API endpoint hierarchy. Each item in the outline has a context menu that allows
access to context specific commands. Most of the command will ask you for the target stage when triggered.
#### Top container objects
Each of the top hives has a context menu that lets you invoke service/project related functions.

##### Package
Package will ask for the stage and optionally region and packages the service with `serverless package`.
##### Deploy
Package will ask for the stage and optionally region and deploys the service with `serverless deploy`.
##### Variable resolution (Resolve)
Resolve allows you to show a generated `resolved.yml`, i.e. your `serverless.yml` with all Serverless
variables resolved to their values for a selected stage.
#### Functions
The functions hive lets you analyze your service function-wise and contains a node for each function.
Each function then contains a list of all defined HTTP endpoints in the function definition.

All function related commands of the extension can be called via the context menu of the function.

##### Deploy function
Deploys the selected function with `serverless deploy function`. Attention: In general, single function
deployment does not replace a service deployment. See the Serverless documentation for details.
##### Invoke local
Invoke the selected function locally. The command lets you select an `event.json` that will be used
for the local invocation. Setting a custom context is not yet possible.
##### Show logs
Retrieve and show the online logs of the deployed function in the output pane.
##### Open handler
Open the handler source file that is associated with the function.
#### API
The API hive shows the combined API that will eventually be deployed to API Gateway.
## Releases
See the `CHANGELOG.MD` file.