I got an error "cannot get awsConnection of undefined". If we deploy again code with nodered, the function intialize works well. So is there any tips to wait until context.global is defined ?
Are those nodes all of the same type? In other words, are they defined in the same JS file? If so, you could just use a variable in your file to share them - rather than use context that is typically used for data that can be serialised as JSON and saved.
But as Nick suggested, either store it in a variable within that js file, or, maybe even better, create a configuration node for configuring the connection
Just one more question about the same problem.
If it's two different jsfile, what solution would be the best ? Config node can be shared with diffente node ?
If those two nodes are provided by the same node.js module then you could add another js file to the module that both node files require to provide a common utility library they can both use.