Just watched the CDK Day session for Filling the g...
# general
b
Just watched the CDK Day session for Filling the gaps, building and publishing custom construct libraries. Anyone here played with projen or tried to write a Level 2/3 construct for public consumption? I know in SST we've got things like the RDS construct but not sure what processes were investigated to get where the code currently is. Been thinking about building a MongoDB Atlas Construct to declare projects/databases in SST, haven't really been too sure on where to start but I did see that there are some L1 constructs for dealing with Atlas, so I'm interesting in hearing about people's experiences.
t
for provisioning things outside of AWS this usually is just an sst.Script + a custom function. Wish it was more elegant then this
b
Script just overlays the CustomResource stuff right? Which is cool, they used a CustomResource in their example.
t
yeah
b
How elegant a solution would you be looking at in a perfect world?
t
something about filling my AWS account with random lambdas for these things bothers me
ideally I would be able to provide code that executes inside CloudFormation instead of leaking into my aws account as a function
b
I guess that's no trivial task, did a cursory look through AWS docs and couldn't see they offer anything like that.
Best thing I've found so far but not sure it gets around the problem: https://aws.amazon.com/premiumsupport/knowledge-center/cloudformation-commandrunner-stack/
r
@Brinsley I think what you'd be interested in is https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-types.html if you'd like to vendor full CF types, or https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.custom_resources.Provider.html + https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.SingletonFunction.html which is just CDK and how the CDK natively implements some custom functionality like log retention
We implement some Custom Resources for Cloudformation the latter way. Sadly the Resource Type method is very painful in my experience, which is especially sad since it lets you implement some things you can't with CDK Custom Resources
b
Thanks for the input guys