Kelly Davis
09/07/2021, 4:19 PMPreparing your SST app
Transpiling source
Synthesizing CDK
Building Lambda function ../../mygoapp/lambdas/mylambda
go: cannot find main module, but found .git/config in /Users/me/projects/myproject
to create a module there, run:
cd ../.. && go mod init
Currently I am trying for something like this:
/mygoapp
/mygoapp/go.mod
/mygoapp/go.sum
/mygoapp/lambdas
/mygoapp/lambdas/mylambda
/cdk/mystack
/cdk/mystack/lib/ <- stack code
/cdk/mystack/package.json
/cdk/mystack/sst.json
If I move everything in /cdk/mystack
under /mygoapp
, everything seems to work, but I'd like to keep the cdk code separatethdxr
09/07/2021, 4:20 PMsst.json
needs to be at your project root. I think you can still keep the rest of your dir structure as isthdxr
09/07/2021, 4:22 PMthdxr
09/07/2021, 4:22 PMKelly Davis
09/07/2021, 4:22 PMthdxr
09/07/2021, 4:22 PMthdxr
09/07/2021, 4:23 PMsrcPath
to ../../mygoapp/
and then setting handler to lambdas/mylambda
thdxr
09/07/2021, 4:23 PMKelly Davis
09/07/2021, 4:23 PMKelly Davis
09/07/2021, 4:24 PMKelly Davis
09/07/2021, 4:27 PMKelly Davis
09/07/2021, 4:45 PMthdxr
09/07/2021, 6:31 PMthdxr
09/07/2021, 9:06 PMKelly Davis
09/08/2021, 12:19 AM|- services/
|--- billing-api/
|--- notes-api/
|--- notify-job/
|- infrastructure/
|- libs/
|- package.json
as described in the link above under the monorepo section (assuming the sst.json and the cdk code would be in infrastructure for the monorepo example).Kelly Davis
09/08/2021, 12:23 AMthdxr
09/08/2021, 1:15 AMthdxr
09/08/2021, 1:15 AMinfrastructure/
Kelly Davis
09/08/2021, 1:39 PMKelly Davis
09/08/2021, 2:51 PM