Skip to content

Question: How do references to other components' output work? #16

@jedfoster

Description

@jedfoster

This is a more general question about working with Serverless Components, not necessarily specific to this repo. If there's a better place to post this, let me know.

The API component in this repo references output from the permissions and database components. How does that work?

See api/serverless.yml lines 9, 17, and 19:

component: express
app: fullstack
name: api

inputs:
  # Express application source code.
  src: ./
  # Permissions required for the AWS Lambda function to interact with other resources
  roleName: ${output:permissions.name}  # <<--- _HOW_ does this work??

AFAICT, the only linkages between the API component and the permissions component are the app values, and directory structure (api/ and permissions/ being siblings).

I'm trying to add a layer to a lambda using those conventions—sibling directories, same app values—but I keep getting invalid reference ${output:commoncode.arnVersion}. What am I missing? How do these output references work?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions