serverless / components

The Serverless Framework's new infrastructure provisioning technology — Build, compose, & deploy serverless apps in seconds...
https://www.serverless.com
Apache License 2.0
2.31k stars 182 forks source link

package-> artifact attribute in a component #305

Open kzvankovich opened 6 years ago

kzvankovich commented 6 years ago

Description

Is it possible to set the following attribute for a lambda function in a component: package-> artifact?

I use this feature for a Java runtime.

Additional Data

E.g. stack trace, version, operating system, ...

brianneisler commented 6 years ago

@kostjazvankovich yep, that would definitely be possible. What would you expect data shape to look like and can you give me an example of what it would look like to use that in a variable?

kzvankovich commented 6 years ago

@kostjazvankovich yep, that would definitely be possible. What would you expect data shape to look like and can you give me an example of what it would look like to use that in a variable?

Hello @brianneisler Brian!

I have a Clojure handler for a lambda function. For the right aws deployment of lambda function I should specify the following attributes in my serverless config:

`service: wac-operator package: artifact: target/wac-0.1.0-SNAPSHOT-standalone.jar

provider: name: aws runtime: java8

functions: handle: handler: brand.wac.Handler events:

  1. runtime is java8.
  2. Package is specified with a standalone jar file.

I don't know how it is possible to specify package artifact and java runtime with serverless components. When I specify runtime java8 my lambda function is deployed with nodeJs runtime.

Best regard, Kostya

kzvankovich commented 6 years ago

Hi @brianneisler ,

in aws-lambda component zipFile property could be configurable:

code: { zipFile: target/wac-0.1.0-SNAPSHOT-standalone.jar }

Best regard, Kostya

kzvankovich commented 6 years ago

@brianneisler , it seems that runtime property in aws-lambda component is not working properly. When I specify java8 value it is deployed with nodeJs one.

kzvankovich commented 6 years ago

Hi @brianneisler, could I starting investigating and fixing of the issue?

brianneisler commented 6 years ago

@kostjazvankovich sorry for the radio silence. We've been in the middle of a big refactor to the core of this system and i'm a bit swamped.

It would be awesome to have you work on adding support for this. However, I would recommend checking out the type-system branch and basing your work off of that. This is the branch we're using to refactor the code base in. https://github.com/serverless/components/tree/type-system