Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MICRO-41: Implementation of resource export #6

Merged
merged 4 commits into from
Nov 23, 2023

Conversation

kai-nguyen-aligent
Copy link
Collaborator

@kai-nguyen-aligent kai-nguyen-aligent commented Nov 21, 2023

This is the first implementation of serverless-export-resources plug-in. This plug-in allow us to exports Lambda or Step Function arn and description with a predefined prefix.

Serverless configuration

  • Though does not requires in the serverless configuration, this plugin will throw errors if the description of the exported resources are not available.
    • Lambda Function description can be set in the function declaration like so:
      functions:
        hello:
          handler: src/hello.handler
          description: >-
            This is a long dummy description of this Hello Lambda service to test the limitation of this export value. 
            It can contain up to 256 characters.
    • Step Function supports setting Comment which can be used as description:
      stepFunctions:
        stateMachines:
          stateMachine:
            name: ${self:service}-${self:provider.stage}-stateMachine
            definition:
              Comment: >-
                This is a very long dummy description of this State Machine service to test the limitation of this export value.
                It can contain nearly 500 characters.
  • The plugin is configured within the serverless.yaml by providing configuration values as the example below
    custom:
      exportResources:
        functions: [hello, world]
        stateMachines:
          - helloWorld

Variables

Variable Usage
functions Array of logical names of Lambda functions to export.
stateMachines Array of logical names of Step Functions to export.
prefix A prefix for export names. If not provide, export names will be prefixed with aser

@kai-nguyen-aligent kai-nguyen-aligent requested review from tvhees and a team and removed request for tvhees November 21, 2023 02:54
@tvhees tvhees merged commit a2fdac7 into main Nov 23, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants