Skip to content
This repository has been archived by the owner on Jan 14, 2020. It is now read-only.

Why depreciated? #15

Open
heri16 opened this issue Feb 20, 2017 · 2 comments
Open

Why depreciated? #15

heri16 opened this issue Feb 20, 2017 · 2 comments

Comments

@heri16
Copy link

heri16 commented Feb 20, 2017

Why is this project being depreciated?

@cristim
Copy link

cristim commented Feb 20, 2017

Because there is a newer version that benefits from recent developments introduced in golang 1.8: https://github.com/eawsy/aws-lambda-go-shim

The new version decouples the Python wrapper and the cgo shim into a pre-built component, and the user's application is compiled as a golang loadable plugin

Previously it was all compiled as a single blob using cgo.

@fsenart
Copy link
Contributor

fsenart commented Feb 20, 2017

Hi @heri16,

From the beginning our commitment is to provide the most native Go experience on AWS Lambda while not sticking users with an idiomatic vision, so that if in the future AWS teams support officially Go then you can migrate seamlessly. It makes this project and its next version, ephemeral.

At the time we created this project, the only way to offer a native experience was to compile the shim along with the user code. Even if this approach works, one of its main disadvantage is that it constraints users to use this kind of initialization code:

func init() { runtime.HandleFunc(handle) }
func main() {}

But, you won't see this kind of initialization in any other officially supported AWS Lambda runtimes.

With the advent of Go 1.8 and its new plugin feature, we can now provide a nearly perfect Go support for AWS Lambda. Indeed, now the shim is apart from the user code. The consequences:

  • You won't need any initialization code
  • We bet, that you'll be able to run the exact same function on the hypothetical future official AWS Lambda Go runtime.

Try to spot the difference with other officially supported runtimes:

// Node.js
exports.Handler = function(evt, ctx) {
  ...
}
# Python
def Handler(evt, ctx): 
  ...
// Java
Output Handler(Event evt, Context ctx) {
  ...
}
// C#
Output Handler(Event evt, ILambdaContext ctx) {
   ...
}
// Go
func Handle(evt *Event, ctx *runtime.Context) (interface{}, error) {
  ...
}

This is basically why this project is being depreciated, in favor of https://github.com/eawsy/aws-lambda-go-shim.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants