Hi, we are trying to move from serverless pro to s...
# general
s
Hi, we are trying to move from serverless pro to seed.run, but stuck in a general problem, we use cloudformation to create cognito with custom lambda based authentication. we have a mono repo, were in one service we have the lambdas. And in another service we have cognito. So in pipeline we have two stages, in the first stage the lambda deploys and after that the cognito, this is easy to setup , but i want to refer the output of the lambda service (some lambda arns) and use them in cognito service. In serverless pro, i would use "output" and then use them like this in the next stack
${output:auth.CreateDashlambdaLambdaFunctionQualifiedArn}
I do not want to manually copy the arn, as we have many other use cases like dynamodb stream processing in lambda as one, which we will migrate after this. whats the best way to do this in seed ? i did not see this in the seed.run documentations
t
Hey Sourav - we're not available as much on the weekends but Frank generally will answer questions about #seed
f
Thanks @thdxr.
Hey @Sourav Sarkar,
output
is a Serverless Pro way to reference Arns across stacks. There’s an AWS native way to do this - stack output exports. It’s the recommended way to share Arns and other resource information across stacks.
Essentially, you export the Lambda ARN in one stack, and then import it into another stack.
Here’s an example of how to export and import in
serverless.yml
. It’s exporting/importing an SNS Topic ARN in the example. You can export/import a Lambda ARN in a the similar fashion.
Let me know if this makes sense.
s
sure i also figured this out after searching cross stack reference and it worked ! thanks for the help 🙂