Releases: satr/intellij-idea-plugin-connector-for-aws-lambda
Fixed an issue with maven artifact path and not closed file.
Fixed an issue with maven artifact path and not closed file.
The pre-release 1.7* is not published as I faced periodical hanging of the IDEA. I'm not sure if the plugin can cause a problem.
For reference
https://intellij-support.jetbrains.com/hc/en-us/articles/206544899-Getting-a-thread-dump-when-IDE-hangs-and-doesn-t-respond
Fixed issues with profiles
Fixed an issue with not loading functions when default profile does not exist.
Handled invalid profiles settings.
Extended logging messages.
Basic support for uploading Node.js function
Added basic support for uploading Node.js function with zip-archived artifact.
- Install Node.js, verify npm is also available
- Install NodeJS plugin to the IntelliJ IDEA: start the IntelliJ IDEA, open Preferences, navigate to the Plugins tab, hit the "Browse repositories..." button, search and select NodeJS, hit "Install" button and then "Restart IDEA" to apply changes.
- On you disk - create a folder for a project for the Node.js AWS Lambda function, navigate to this folder
- run commands to install aws-sdk modules and create empty file "index.js" within "src" folder
npm install aws-sdk
mkdir src
touch src/index.js
(in Windows instead of "touch": echo "" > src/index.js )
- In IntelliJ IDEA open the project, selecting the folder, created above
- In the index file copy paste the code:
exports.handler = (event, context, callback) => {
callback(null, "some success message with a name " + event.name);
// or
// callback("some error type");
}
-
Open the Project Structure, select Artifacts section on the left
-
Hit the "+" button to add a new artifact, choose a type "Other"
-
Specify a name of the artifact, optionally - tick the checkbox "Include in the project build"
-
In the "Output Layout" tab - hit the icon "Create Archive" (a second one next to the icon "Folder with +")
-
In the dialog - enter the archive name, with an extension ".zip", hit "Ok"
-
Right click on the added archive-name, in the menu - select "Create Directory", enter "node_modules", hit "Ok"
-
Right click on the added directory name, in the menu - select "Add Copy of", select "Directory Content", choose the folder "node_modules" in the project's folder, hit "Open"
-
Similar way - add a reference to the folder "src" in the project's folder
-
Right click on the archive-name, in the menu - select "Add Copy of", select "File", choose a file "package-lock.json" in the project's folder, hit "Open"
-
Rebuld the project and an artifact (if not build automatically). Check if the artifact contains the file in the "out" folder of the project
-
Refresh the "Artifacts" list in the "Connector for AWS Lambda" plugin tab, select the artifact and a function (with NodeJS runtime), where it should be uploaded
-
In the "Handler" field - enter "src/index.handler", where "src" is a project's folder "src" (if used), "index" - the name of the js-file, where the function is located, "handler" - a name of JavaScript funtion (in this example it is second part of "exports.handler")
-
Hit the button "Upload function" in the plugin form
-
Test the function - open the "Run Test" tab, hit the button "Run test of the function"
Fix with buttons layout and AWS streams order and sets
Fixed button layout for the version IDEA 2018.2.RC
The list of AWS streams has been ordered by event time, descendant.
Added a button to load next list of AWS stream set (split by 50 items).
UI improvements, clear/delete/re-format content, sorted lists
- Save and restore selected jar artifact per function - implemented by DragoX.
- Fix last selected function restore after relaunch - implemented by DragoX.
- Sorted alphabetically function and JAR-artifact lists.
- Function configuration details form can be collapsed or expanded.
- Reformat JSON content for input and output. Output can be auto-formatted on function invocation.
- Deleting of AWS log streams for a selected function.
- Clear content for input and output.
- Set constraints to function properties and code file size. Added links to these values on AWS documentation site.
UI improvements, clear/delete/re-format content
Configuration and AWS Log for a selected function. Support of Maven project artifacts.
Configuration and AWS Log for a selected function. Support of Maven project artifacts.
Maven project artifacts supported
Artifact list is automatically refreshed after a project or artifact build.
Artifact list is automatically refreshed after a project or artifact build.
Show and update selected function configuration.