Looking at pulumi's magic functions and spawn as r...
# aws
q
Looking at pulumi's magic functions and spawn as referenced in https://aws.amazon.com/blogs/compute/running-executables-in-aws-lambda/ and getting
Copy code
Diagnostics:
  pulumi:pulumi:Stack (quickstart-dev):
    error: Error serializing '(event) => __awaiter(void 0, void 0, .
    
    '(event) => __awaiter(void 0, void 0, ...': index.ts(20,19): cap
      'spawn', a function defined at
        function 'spawnWithSignal': child_process.js(900,24): which 
          'validateAbortSignal', a function defined at
            '(signal, name) => { if (signal !== u ...': which captur
              'ERR_INVALID_ARG_TYPE', a function defined at
                function 'NodeError': which referenced
                  function 'getMessage': which captured
                    variable 'messages' which indirectly referenced
                      function 'get': which could not be serialized 
                        it was a native code function.
    
    Function code:
      function get() { [native code] }
Is it possible to use spawn with Pulumis' "magic functions"?
@billowy-army-68599 ^^
Outside of spawn I tried to use JSDOM via "magic functions" and
Copy code
pulumi up
Previewing update (dev):
     Type                                          Name            Plan       Info
     pulumi:pulumi:Stack                           quickstart-dev             1 error
     └─ aws:cloudwatch:EventRuleEventSubscription  putObjects                 
 ~      └─ aws:cloudwatch:EventRule                putObjects      update     [diff: ~scheduleExpression]
 
Diagnostics:
  pulumi:pulumi:Stack (quickstart-dev):
    error: Error serializing '(event) => __awaiter(void 0, void 0, ...': index.ts(21,19)
    
    '(event) => __awaiter(void 0, void 0, ...': index.ts(21,19): referenced
      function 'JSDOM': api.js(30,13): which referenced
        function 'transformOptions': api.js(199,25): which referenced
          function 'CookieJar': api.js(20,13): which referenced
            function 'CookieJar': cookie.js(1059,13): which referenced
              function 'setCookie': index.js(4,40): which captured
                'fn', a function defined at
                  function 'setCookie': cookie.js(1078,11): which referenced
                    function 'getCookieContext': cookie.js(744,25): which referenced
                      function 'urlParse': which referenced
                        function 'Url': which referenced
                          function 'parse': which referenced
                            function 'validateString': which captured
                              'ERR_INVALID_ARG_TYPE', a function defined at
                                function 'NodeError': which referenced
                                  function 'getMessage': which captured
                                    variable 'messages' which indirectly referenced
                                      function 'get': which could not be serialized because
                                        it was a native code function.
    
    Function code:
      function get() { [native code] }
Trying to use https://github.com/jsdom/jsdom#convenience-apis fromURL but looks like it calls serialize().
Then I can't execute binaries and I can't write my own code with what look like typical js libraries.