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 181 forks source link

Component: Function #405

Open austencollins opened 5 years ago

austencollins commented 5 years ago

This Component abstracts all FaaS services and creates a common interface (that allows for custom configuration).

Instead of the interface approach like previous Component implementations, this would simply leverage the tree approach we are using now. It would contain multiple SDKs and the knowledge of how to use them to deploy to different FaaS products.

eahefnawy commented 5 years ago

@ac360 do you think this is where we should add the layers functionality? rather than in the AwsLambda component?

pmuens commented 5 years ago

What's the value of having this vs. a raw Lambda / CF component?

The user usually knows in which cloud she wants to deploy the application.

I never saw the value of such a component in the old implementations. It was just another layer of abstraction which caused confusion and a bloated codebase (a reason could've been that the old implementation was quite involved).

eahefnawy commented 5 years ago

@pmuens I think it's useful to have a common interface between providers, with UFS...etc

austencollins commented 5 years ago

A few benefits, imo:

I have a vague idea for this that I'm dying to prototype...

A single line, vendor-agnostic, ARN-like concept that includes the resource, but also includes permissions. Something like this...

aws:[service]:[serviceInstance]:[permissions]

Examples:

aws:dynamodb:*:*
aws:dynamodb:users:read
aws:dynamodb:users:write
aws:dynamodb:users:crud
aws:dynamodb:myapp*:crud
aws:ddb:users:crud
aws:ddb:users:crud:useast1
google:vision:query
azure:functions:write
components:
  Function::createUser
    permissions: 
      - aws:ddb:users:write