Comments (8)
Thanks for the suggestion, this definitely looks like a neat solution. It might be worthwhile looking into this, especially if/when we start supporting Node/Java lambdas (currently only Python Lambdas are supported), and to support full parity with the AWS environment.
There are some other issues and feature requests which probably have higher priority, but I would be more than happy to accept a pull request that adds an integration with lambci/docker-lambda
.
from localstack.
An initial version of Docker-based Lambda execution is now available. Can you please try to run the following commands from the repository root:
git pull
docker pull atlassianlabs/localstack
make test-docker
You will notice that the output of the last commands contains a few lines like this:
docker run ... lambci/lambda:python2.7 "handler.handler"
...
docker run ... lambci/lambda:nodejs "handler.handler"
If the test runs successfully, then you should be good to start LocalStack in Docker and run your own custom Lambda function tests against it (only Node.js and Python are currently supported):
make docker-run
Please report back if that works for you (plus your environment details, if it does not work). Thanks.
from localstack.
I tried this today. I am able to get the lambda to run a simple function
exports.handler = function(event, context, callback){
callback(null, "works");
}
But am getting an error
init handler error: TypeError
at exports.handler (/var/task/read.js:2:11)
from localstack.
ok, scratch that.. I needed to run the 6.10. Proper command for me was...
docker run -v "$PWD":/var/task lambci/lambda:nodejs6.10
from localstack.
Thanks @singledigit, support for 6.10 was still missing when you tested it. In the updated version you can now specify nodejs6.10
as your Lambda runtime (see atlassian-archive/localstack@a240285#diff-2dce34f36977e0b6398556134ff5f411R32). Closing this for now, please re-open if there are any more issues.
from localstack.
I tried this today... basically I ran docker run -it -p 4567-4580:4567-4580 -p 8080:8080 atlassianlabs/localstack
and then tried to pipe in a simple nodejs handler and it immediately blew with an SyntaxError: invalid syntax
around a constant, even though i usesd the nodejs6.10
runtime.
const docs = `bla bla ${variable}`
What am i doing wrong?
from localstack.
So you call lambci directly.
docker run -v "$PWD":/var/task lambci/lambda:nodejs6.10
For that you don't even need local stack. However, you can link into local stack with something like
docker run --link <localstack-container> -v "$PWD":/var/task lambci/lambda:nodejs6.10
That will allow you to connect to the local stack services. I would love to see an example of configuring local stack lambda to call on lambic.
from localstack.
i was hoping to use the aws --endpoint-url=http://localhost:4574 lambda create-function
cli tool... i'll try your way to check it out
from localstack.
Related Issues (20)
- bug: 500 returned on TransactWriteItem when writing to DynamoDB table with Streams enabled HOT 4
- bug: Different error response when missing API Gateway auth header HOT 7
- enhancement request: Add support for RDS (manage-master-user-password)
- Enhancement Request: Support for ECS Task Metadata Endpoint
- bug: Step Functions: heartbeat tokens become invalid when several executions run concurrently HOT 2
- enhancement request: Firehose file extension is not respected HOT 1
- Add support for AWS managed master user passwords in aurora RDS clusters (postgres) HOT 1
- bug:AWS RDS Aurora clusters - Performance Insight
- bug: terraform can't get API Gateway root resource id HOT 7
- bug: describe-images command not work HOT 2
- bug: DynamoDB TTL not working when table has a range key HOT 2
- enhancement request: Secrets Manager does not implement `batch_get_secret_value` HOT 2
- bug: Stepfunction stops working when starting distributed map state second time HOT 1
- bug: Creating a new VPC and looking up a resource from an SSM Parameter Value forces CDK redeploy even when there are no changes HOT 1
- bug: lambda could not connect to rds mysql cluster HOT 5
- bug: malformed cloudformation template is deployable HOT 2
- bug: EventBridge PutEvents not failing invalid entries
- bug: PutEvents entries can exceed the AWS limit of 10 HOT 1
- bug: Cannot create an asymmetric KMS key for import HOT 2
- bug: DynamoDB TransactWriteItems Update Produces `MODIFY` CDC event for new items HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from localstack.