Serverless Framework is a fantastic tool for defining and managing your Lambda functions. But let's face it; it's not very good at handling other t...
For further actions, you may consider blocking this person and/or reporting abuse
Nice article ! Thanks for sharing.
In addition, if your CDK stack does not require any assets to be uploaded (understand does not contain any lambda, which should be taken care of by Serverless framework definition), you can use CDK programmatic API
synth
to inject generated Cloudformation resources directly within theresources
key of your serverless.yml file. You then only need to runsls deploy
to deploy both Serverless framework resources and CDK resources. Take a look at twitter.com/bartheletf/status/1382... to know more !Ooh, that's a great point I didn't consider! It does make it a bit simpler but you also lose a few of the benefits of having the separate stacks and being able to
cdk diff
for example, I suppose.Thanks for the tip! 🙌
Hi @Frédéric, excellent idea but I had a question:
What if the exported values are tokens? Cause the token values are alloted actual values only after deployment through cdk.
Hi @adityanair102001 , I wrote an article to explain in more detail what can be achieved in terms of CDK provisioning through Serverless framework lifecycle. You can have a look at dev.to/kumo/serverless-framework-a... to learn more. Token can be resolved using the resolve API available on the CDK stack :)
Thanks for sharing! Having to reference the queue with a simple
{cf:InfrastructureStack.queueUrl}
is much better than making complex Joins in CloudFormation.In one of my projects, I was having to reference a queue like this:
Ah, I've had my fair share of those! Happy you found it useful! 🙌
The "cd infrastructure && yarn cdk" trick was nice!
Fantastic! Cleverly combines 2 awesome things :) Bookmarked for later, this actually is a wheel I have invented many times before with varying levels of pain.
Glad you liked it! 🙌
Sounds interesting! I think it could be helpful if you want to eventually migrate to CDK completely.
I agree! And if not, in one way or another we'll likely some kind of support in Serverless to use CDK constructs in the future and this could bridge the gap until then!