Hey there, I’ve been working on a high-level Pulumi component library for AWS, would really love it ...
t
Hey there, I’ve been working on a high-level Pulumi component library for AWS, would really love it if anyone’s willing to offer some feedback: https://github.com/cfeenstra67/stackattack Largely I’ve just polished up some of the patterns I’ve been using in production for a while so that it’s easier to spin up infra for new projects without a ton of boilerplate; I figured others may find this appealing as well. One intentional aspect of the design is that components are just functions, which means you can easily copy/paste and extend them to meet whatever needs you have
a
Do you have support of cost report, like adding a cost-specific tag for the stack.
The factory-style approach is very similar to what I am working on internally.
And I am also looking for support of lambda functions.
t
@adamant-lawyer-19698 with the
Context
you can add tags to the entire stack by passing them into the
context
function or to specific parts using `.withTags({ ... })`; e.g.
Copy code
const ctx = saws.context({ tags: { tag1: 'value1' });

const subCtx = ctx.withTags({ tag2: 'value2' })
Is that what you were looking for? More info on the "context" here: https://stackattack.camfeenstra.com/concepts/context (though looking at it now there are probably some improvements I should make) On the lambda functions--you're right I haven't added that as a first-class component yet, do you have a specific use-case in mind? You can use Pulumi's
aws.lambda.Function
or
aws.lambda.CallbackFunction
resources to create lambda functions. It's not immediately clear what value a higher-level component would provide over using the Pulumi resources directly. Do you have something more specific in mind such as running cron-job type tasks, or serving as an event handler for other AWS services (e.g. eventbridge or SNS or something)?
a
I am thinking lambda should be side by side with service. They are 2 popular ways to deploy your binaries.
t
That makes sense. I started with the more "traditional" approach of deploying containers into an cluster of instances w/ autoscaling mainly due to my experience of the complexity of getting that working, but you're definitely right that deploying to Lambda is very common these days and there's more to it than just creating one or more lambda functions if you want to serve your application that way. That's a great suggestion, I appreciate it!
👍 1