I got some questions regarding using Pulumi for se...
# general
I got some questions regarding using Pulumi for setting up lambdas Interested to hear other people's thoughts: https://github.com/pulumi/pulumi/discussions/15019
If you find a way, could you please share it? AWS SAM can do this, hopefully Pulumi can too.
One way could be having the software as an independent module and testing it separately, while testing the Lambda/AWS-specific part after deployment.
We put the lambda code into a separate module that we can run unit tests on, then use a FileAsset via Pulumi to pull in the code.
Copy code
code: new pulumi.asset.AssetArchive({
            // the FileAsset file name does not have to match the map key
            // the map key is what the file will be in the lambda payload
            // the file as known to the lambda will be used in the 'handler', above
            'index.js': new pulumi.asset.FileAsset(`./lambda/jumpboxAccessReset/jumpboxAccessReset.js`),
One slight wrinkle: we have to use
ignoreChanges: ['code']
on the Function in Pulumi because we build and deploy from hosted CI/CD -- otherwise running previews locally will constantly generate changes because file paths are different.