question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use serverless-{service-name}-{stage}-ServiceEndpoint as default CF export name for ServiceEndput

See original GitHub issue

Currently ServiceEndpoint and ImportEventLambdaFunctionQualifiedArn from CF stack are Output variables, but it would be nice to have default Export Name for them, something like sls-{service-name}-{stage}-ServiceEndpoint.

It would allow to auto-use outputs from the stack in other CF scripts by default.

We currently can do the same functionality in the custom resource section where we can introduce an output variable with export name but it would be cool to have this available by default for core output variables.


Proposed solution

(added by maintainers)

For each configured output in scope of the Framework, configure an export name with following naming rules:

sls-{service}-{stage}-{outputName}

I think it’s unique enough to not be considered as breaking change, still if you feel it can be risky to just introduce that please elaborate.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

5reactions
hubsicommented, Mar 9, 2018

Just want to clarify on what to add to the custom resource section in serverless.yml, since I was looking for it myself:

  Outputs:
    ServiceEndpointExport:
      Description: Exported Url of the endpoint
      Value:
        Fn::Join:
          - ""
          - - "https://"
            - "Ref": "ApiGatewayRestApi"
            - ".execute-api.eu-west-1.amazonaws.com/dev"
      Export:
        Name: "${self:provider.stage}:${self:service}:ServiceEndpoint"
0reactions
medikoocommented, Apr 19, 2021

@js-cha it’s all yours!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Resolve the "Export EXPORT_NAME cannot be updated as it ...
Resolution · 1. Open the AWS CloudFormation console. · 2. From the CloudFormation menu, choose Exports. · 3. For Export Name, choose the...
Read more >
How do I resolve the "No Export named XYZ found ... - YouTube
Skip directly to the demo: 0:30 For more details see the Knowledge Center article with this video: ...
Read more >
Export the Lambda ARN - Stack Overflow
Try resources: Outputs: ServiceLambdaFunctionQualifiedArn: Export: Name: MyServiceARN Value: Fn::GetAtt: ServiceLambdaFunction.Arn.
Read more >
Dynamic Bindings for CloudFormation Stacks using Fn
By giving the parameter the export name as default value, we can deploy the stack the same way as before, but now we...
Read more >
Export with name is already exported by stack - Seed.run
Problem. CloudFormation export key names are unique per region in your AWS account. Your CloudFormation stack is exporting a value with the key...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found