Giter Site home page Giter Site logo

Comments (8)

deepakjois avatar deepakjois commented on July 30, 2024

Versioning has already been added in 2300aeb

It should be documented in the README.

from gulp-awslambda.

deepakjois avatar deepakjois commented on July 30, 2024

Actually, it looks like there is a bug in the implementation. It does not publish a version if the gulp-awslambda is invoked like this

return gulp.src("index.js")
  .pipe(zip("index.zip"))
  .pipe(lambda("ProcessRequest", opts))

This is because the code logic is short-circuited if the first argument is a string.

from gulp-awslambda.

willyg302 avatar willyg302 commented on July 30, 2024

@deepakjois This has been addressed in the latest release (0.3.0). The problem with passing a string is that you cannot specify Publish: true, so I went instead with opts.publish = true for this case.

@petemounce I'll have to give some more thought on how to support aliases as well, since currently params are more or less passed directly through to the underlying API, and supporting aliases would require multiple API calls. If you have any suggestions on what your desired experience would be please let me know. Thanks!

from gulp-awslambda.

petemounce avatar petemounce commented on July 30, 2024

@willyg302 I would if possible want to be able to separate "deployment" (in my mind, creating or updating a function) from "release" (creating or updating an alias - eg, promote beta -> production). For me, I'd like to be able to

  • push a lambda zip file to create the function, when it does not exist
  • push a lambda zip file to create a new version of a function, when the function does exist
  • separately, create an alias against a particular version of a function (or, $LATEST if no version is specified)
  • separately, update an alias to point at a different (given) version of the function (or, $LATEST if no version is specified)

I have not quite wrapped my head around the scenarios that I think Lambda can now support, but I think that Lambda versions and aliases can be used to

  • do blue/green deployments/releases at function granularity
  • do A/B testing since API Gateway resources can, I think, be pointed through different Lambda aliases depending on API Gateway stage variables

from gulp-awslambda.

 avatar commented on July 30, 2024

With the gulp project's code-over-config best practice and narrow scope of what modules should be created for, I would think that this module should only handle the concern of uploading the function code and optionally mapping to a specific version. The aws-sdk should then be used in a subsequent callback to map the new function version to one or more aliases.

Alternatively maybe a new module should be created to be piped the result of the lambda function upload, but I think the gulp best practice would be to just code that into a task since it isn't really doing anything with the stream but just configuring a service.

Great work on this module btw, it has been a huge time saver for me!

from gulp-awslambda.

petemounce avatar petemounce commented on July 30, 2024

@keithchilders: so, you advocate a new plugin, gulp-awslambda-aliasing (or similar) for what I describe? Wouldn't that make it less convenient to work with, since now one has to know about and install 2 plugins, which may have inconsistent ways of dealing with configuration and so forth?

from gulp-awslambda.

justinmchase avatar justinmchase commented on July 30, 2024

Can you guys give a brief example of how to do a publish a new version with the params and opts both being objects?

Also, I would like to prevent publishes over an existing version. Is that possible?

from gulp-awslambda.

SeanRoy avatar SeanRoy commented on July 30, 2024

I have a solution for this. Watch for my PR.

from gulp-awslambda.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.