News for hackers. Stuff that matters.
Re:Announcing Go Support for AWS Lambda by ramses0 on Tuesday January 16, 2018 @04:39AM (#16156892)
What's the current state of the art for "I know I use AWS for my 9999-server production instance, but how can I test the majority of my services offline on an airplane w/o spending $199.99/mo to keep a fleet of test AWS servers/services at the ready"?

Last I looked the "fake-aws", specifically "lambda" supported python, not JS/Node, which was not matching my use-case. Go is now on the radar as a usable programming language for this purpose, but what are the chances of being able to also use it with local test deployments?

Re:Announcing Go Support for AWS Lambda by jonstokes on Tuesday January 16, 2018 @09:15AM (#16158272)
I'm using this, and so far it's working just fine:

https://github.com/awslabs/aws-sam-local

I'm only testing Lambda functions with it, and not really testing APIG + Lambda integrations or anything fancier.

I prep the local db, mock a Lambda event, write the mocked event to a JSON file, then use command line options to run the event against AWS SAM local, then get the response and compare it to the expected response.

Re:Announcing Go Support for AWS Lambda by brazzledazzle on Tuesday January 16, 2018 @09:02AM (#16158169)
I haven't used it yet but I've heard good things about localstack[0]. Originally it was in the Atlassian GitHub organization[1] but they moved it over to its own at some point.

0. https://github.com/localstack/localstack 1. https://github.com/atlassian/localstack/

Re:Announcing Go Support for AWS Lambda by inopinatus on Tuesday January 16, 2018 @03:40PM (#16162284)
When computing on an airplane you may already be in the cloud.
Re:Announcing Go Support for AWS Lambda by cachesking on Tuesday January 16, 2018 @09:01AM (#16158163)
Unit tests are all you should really need. Mock the AWS services and make sure to assert, where you can, the arguments being sent to those services and you should have enough coverage to get the job done.
Re:Announcing Go Support for AWS Lambda by jsty on Tuesday January 16, 2018 @08:56AM (#16158140)
Do you need to keep them running constantly? The beauty of platforms like AWS, GCP, ... is that provisioning capacity is just an API call away - so could you not have some way of provisioning those resources on demand to run the necessary tests?

(If you can't get internet on your plane then you might not be able to run tests, but that's the case with the full test suite on a fair few systems anyway)

Re:Announcing Go Support for AWS Lambda by ramses0 on Tuesday January 16, 2018 @02:51PM (#16161665)
The services are incredibly useful, incredibly powerful, but from a code + dev hygiene perspective it's safer to be able to completely test your code in isolation prior to deployment.

Many people are saying: "Just mock the AWS parts..." or "Provision from amazon on demand...", but there should be "common" mocks, or ideally "toy mocks" which can be used locally in order to verify the production system works how you expect it to, prior to deployment to that production system.

Basically, I'm uncomfortable making AWS a hard-dependency if I can't get something like it running locally for a "100 record use case"

Re:Announcing Go Support for AWS Lambda by cachesking on Tuesday January 16, 2018 @04:59PM (#16163111)
It would be nice if AWS provided mocks but the reality is that's there is more than one lib for creating stubs and mocks for every language. Additionally, I would assume that AWS want's to steer clear of making those types of decisions for the developer. The "what lib do I use for x" decisions that developers have to make.
Re:Announcing Go Support for AWS Lambda by dschep on Tuesday January 16, 2018 @08:25AM (#16157954)
Yeah, that's probably the worst part of 'serverless computing.'

If using the serverless framework, the serverless-offline plugin[0] supports JS/Node but not Python.

[0] https://github.com/dherault/serverless-offline