myrmex-org / myrmex Goto Github PK
View Code? Open in Web Editor NEWServerless application builder :ant:
Home Page: https://myrmex-org.github.io/
License: MIT License
Serverless application builder :ant:
Home Page: https://myrmex-org.github.io/
License: MIT License
Create an object in the core that represents a "context". A context is composed of 2 properties
The context will be used by plugins when they are creating resource in AWS.
... instead of the API identifier
So that it is not necessary to specify it for each deployment
When referencing IAM roles in the node-lambda
plugin, the user should be allowed to enter:
Show progress and statistics of deployment in formatted tables.
Example of possible implementation in api-gateway and node-lambda plugins
Add bunyan to the project and expose it in lager.import
When referencing IAM roles in the api-gateway
plugin, the user should be allowed to enter:
iam
pluginHi. I was creating a fresh Myrmex project then received the following error when creating a Lambda without IAM Roles (yet):
$ myrmex create-lambda example
? Choose the runtime nodejs6.10
? Choose the timeout (in seconds) 30
? Choose the memory 256 MB
? Where can we find the execution role of the Lambda? Select a role managed by the plugin @myrmex/iam
? Choose the execution role[2017-10-19T17:09:43.126Z] FATAL: Uncaught Exception: Cannot read property 'value' of undefined
TypeError: Cannot read property 'value' of undefined
...
...
at emitOne (events.js:96:13)
at Interface.emit (events.js:188:7)More information in myrmex.log
As you can see in the log there was no option in the "Choose the execution role" question to accept that I still had no IAM Roles and instead I received that error at pressing Enter.
I think I should receive a warning before entering this dead end question or just don't show this option (managed role) if there's no IAM Role.
Thanks in advance.
The iam
command line should propose various common role configuration (API Gateway invocation role and Lambda execution role for example)
I have some propositions to improve the Myrmex Logo adding an ant on it.
I'd like to have opinions about it.
Thanks for your feedback
Hola! @AlexisNo has created a ZenHub account for the lagerjs organization. ZenHub is the only project management tool integrated natively in GitHub – created specifically for fast-moving, software-driven teams.
To get set up with ZenHub, all you have to do is download the browser extension and log in with your GitHub account. Once you do, you’ll get access to ZenHub’s complete feature-set immediately.
ZenHub adds a series of enhancements directly inside the GitHub UI:
Still curious? See more ZenHub features or read user reviews. This issue was written by your friendly ZenHub bot, posted by request from @AlexisNo.
Hi, here's the problem:
I set my lambda config file as below:
{
"params": {
"Timeout": 60,
"MemorySize": "512",
"Runtime": "nodejs6.10",
"Handler": "lambda.handler",
"Role": "arn:aws:iam::163140259062:role/cs-site-lambda-function",
}
}
So, when I try to run myrmex anything
the error is just this batch of words without meaning =P
{
"name": "myrmex",
"hostname": "csrjl130l",
"pid": 9679,
"level": 60,
"promise": {
"isFulfilled": false,
"isRejected": true,
"rejectionReason": {}
},
"reason": {},
"msg": "Unhandled Rejection",
"time": "2017-07-13T17:13:53.111Z",
"v": 0
}
After some time digesting the possible errors I found the extra comma after the "Role" attribute in config.json.
I think such a failure could be at least discernible as a JSON configuration file loading error.
Thanks, mate
We will need a new event in Api.generateSpec()
so that when the AWS spec is generated, we inject the documentation spec in an endpoint (GET /doc
by default with a mock integration)
Hi, i'm trying to deploy a Lambda on South America (sa-east-1) region for a job and Myrmex returns me an error:
sa-eat-1 is not a valid AWS region - available values: us-east-1, us-west-2, eu-west-1, eu-central-1, ap-northeast-1, ap-southeast-1
This Region is now available for Lambda.
I'll try to make a fork and PR, tough I assume I should first issue out the problem.
Using the command lager create-node-lambda
creates a folder structure for the Lambda code and includes a "config.json" file with user created modules listing, but I miss a list for my external modules (node_modules) like a "package.json".
It happens a lot when using multiple endpoints with require repeating external modules.
Lager could automatically place a simplified "package.json" file with x-lager.dependencies
for user created modules.
To simplify reference from plugins to the lager core and allow the user to have several Lager projects with different Lager versions, it would be better to separate the cli and the core into 2 different modules.
Check that all of them work and document it
Using "lager deploy-roles PlanetExpressLambdaExecution -e DEV -s v0" i received this stack trace because i didn`t configure my aws credentials:
Unhandled rejection InvalidClientTokenId: The security token included in the request is invalid.
at Request.extractError (/Users/alexsouza/Projects/LagerJs-Lambda/planet-express/node_modules/aws-sdk/lib/protocol/query.js:40:29)
at Request.callListeners (/Users/alexsouza/Projects/LagerJs-Lambda/planet-express/node_modules/aws-sdk/lib/sequential_executor.js:105:20)
at Request.emit (/Users/alexsouza/Projects/LagerJs-Lambda/planet-express/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
at Request.emit (/Users/alexsouza/Projects/LagerJs-Lambda/planet-express/node_modules/aws-sdk/lib/request.js:671:14)
at Request.transition (/Users/alexsouza/Projects/LagerJs-Lambda/planet-express/node_modules/aws-sdk/lib/request.js:22:10)
at AcceptorStateMachine.runTo (/Users/alexsouza/Projects/LagerJs-Lambda/planet-express/node_modules/aws-sdk/lib/state_machine.js:14:12)
at /Users/alexsouza/Projects/LagerJs-Lambda/planet-express/node_modules/aws-sdk/lib/state_machine.js:26:10
at Request.<anonymous> (/Users/alexsouza/Projects/LagerJs-Lambda/planet-express/node_modules/aws-sdk/lib/request.js:38:9)
at Request.<anonymous> (/Users/alexsouza/Projects/LagerJs-Lambda/planet-express/node_modules/aws-sdk/lib/request.js:673:12)
at Request.callListeners (/Users/alexsouza/Projects/LagerJs-Lambda/planet-express/node_modules/aws-sdk/lib/sequential_executor.js:115:18)
at Request.emit (/Users/alexsouza/Projects/LagerJs-Lambda/planet-express/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
at Request.emit (/Users/alexsouza/Projects/LagerJs-Lambda/planet-express/node_modules/aws-sdk/lib/request.js:671:14)
at Request.transition (/Users/alexsouza/Projects/LagerJs-Lambda/planet-express/node_modules/aws-sdk/lib/request.js:22:10)
at AcceptorStateMachine.runTo (/Users/alexsouza/Projects/LagerJs-Lambda/planet-express/node_modules/aws-sdk/lib/state_machine.js:14:12)
at /Users/alexsouza/Projects/LagerJs-Lambda/planet-express/node_modules/aws-sdk/lib/state_machine.js:26:10
at Request.<anonymous> (/Users/alexsouza/Projects/LagerJs-Lambda/planet-express/node_modules/aws-sdk/lib/request.js:38:9)
at Request.<anonymous> (/Users/alexsouza/Projects/LagerJs-Lambda/planet-express/node_modules/aws-sdk/lib/request.js:673:12)
at Request.callListeners (/Users/alexsouza/Projects/LagerJs-Lambda/planet-express/node_modules/aws-sdk/lib/sequential_executor.js:115:18)
at callNextListener (/Users/alexsouza/Projects/LagerJs-Lambda/planet-express/node_modules/aws-sdk/lib/sequential_executor.js:95:12)
at IncomingMessage.onEnd (/Users/alexsouza/Projects/LagerJs-Lambda/planet-express/node_modules/aws-sdk/lib/event_listeners.js:230:11)
at emitNone (events.js:91:20)
at IncomingMessage.emit (events.js:185:7)
I wish it would have a more user-friendly message.
Create a mecanism to document the AWS authorizations needed by plugins and show it with the lager
command line
lager exec-node-lambda <identifier>
When deploying my Lambda with lager deploy-node-lambda
and config.json as:
params: {
Role: "role_name_not_arn"
}
Does not resolves the Role name to the Role ARN, and it brings the following error:
Unhandled rejection ValidationException: 1 validation error detected: Value 'qa-cs-billing-server-r-IamRoleLambda-1KLJTGZDLEZKP' at 'role' failed to satisfy constraint: Member must satisfy regular expression pattern: arn:aws:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@\-_/]+
PS: plugin @lager/iam not installed on my project.
Use the context
object for that
lager install-node-lambdas-locally
lager test-node-lambda-locally
Give the possibility to define and select test samples
A project plugin is a Lager plugin that is part of a project but is not an npm package.
By default, these plugins are written in the /plugins
directory of the project.
Hi. I was trying to deploy a node-lambda which I did not define the Role ARN on creation. Then I received this large message:
Unhandled rejection ValidationException: 2 validation errors detected: Value 'PLEASE-CONFIGURE-AN-EXECUTION-ROLE-FOR-billingSendEmail' at 'role' failed to satisfy constraint: Member must satisfy regular expression pattern: arn:(aws|aws-us-gov):iam::\d{12}:role/?[a-zA-Z_0-9+=,.@-_/]+; Value '360' at 'timeout' failed to satisfy constraint: Member must have value less than or equal to 300
at Object.extractError (/home/radamesaragon/nodejs/cs-billing-server/selfContainedLambdas/node_modules/@lager/node-lambda/node_modules/aws-sdk/lib/protocol/json.js:48:27)
at Request.extractError (/home/radamesaragon/nodejs/cs-billing-server/selfContainedLambdas/node_modules/@lager/node-lambda/node_modules/aws-sdk/lib/protocol/rest_json.js:37:8)
... many other stack error lines
So I was left with no instruction to how to add the Role ARN to my Lambda configuration.
I suggest that after the stack error lines the user receive a link to AWS SDK so he can get some hint to fix this.
Update the development environment application with more friendly example.
Could be a simple example of a space delivery company that has 3 APIs:
Publish API Gateway stages based on the context
This configuration will be accessible via lager.getConfig('plugin-name')
My lambda depends on default environmental vars that are already defined at config.js.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.