Can anyone please help me with this ? ```Hi, we a...
# help
s
Can anyone please help me with this ?
Copy code
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
Note: I am not using sst, rather i am using serverless framework
I got some success --> In the first stack I am doing an export like this :
Copy code
resources:
  Outputs:
    DefinelambdaArn:
      Description: 'ARN will be imported by other stacks'
      Value: !GetAtt DefineDashlambdaLambdaFunction.Arn
      Export:
        Name: ${self:service}-${self:provider.stage}-DefinelambdaArn
    CreatelambdaArn:
      Description: 'ARN will be imported by other stacks'
      Value: !GetAtt CreateDashlambdaLambdaFunction.Arn
      Export:
        Name: ${self:service}-${self:provider.stage}-CreatelambdaArn
    VerifylambdaArn:
      Description: 'ARN will be imported by other stacks'
      Value: !GetAtt VerifyDashlambdaLambdaFunction.Arn
      Export:
        Name: ${self:service}-${self:provider.stage}-VerifylambdaArn
And in the second one importing like this :
Copy code
LambdaConfig:
          CreateAuthChallenge: !ImportValue auth-${self:provider.stage}-CreatelambdaArn
          DefineAuthChallenge: !ImportValue auth-${self:provider.stage}-DefinelambdaArn
          VerifyAuthChallengeResponse: !ImportValue auth-${self:provider.stage}-VerifylambdaArn
is this the proper approach ? this works both locally and in seed phased pipelines
f
Hey @Sourav Sarkar, yup this is how I’d do it too. I shared my thoughts here https://serverless-stack.slack.com/archives/C01JVDJQU2C/p1635009430018300