Sourav Sarkar
10/23/2021, 5:58 PMHi, 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 frameworkSourav Sarkar
10/23/2021, 6:56 PMresources:
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 :
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 pipelinesFrank