This message was deleted.
# aws
s
This message was deleted.
w
Any chance you can share you code? And if you are using JavaScript, your
node --version
?
a
I am trying to implement a Mapbox sample app using their template, https://github.com/mapbox/asset-tracking. Curently on node v12.16.1
I'm assuming pulumi wants to run the index file located at https://github.com/mapbox/asset-tracking/blob/master/src/index.js
just find it weird it hangs right out of the gate with Previewing update (testing): Type Name Plan + pulumipulumiStack assettracking-testing create...
w
This is most likely due to the issues in https://github.com/pulumi/pulumi/issues/3528. With Node 12 and newer, there can be hangs in Pulumi programs. We are making changes in Pulumi 2.0 (coming in a few weeks) to prevent the patterns that trigger this. Ahead of that - you can either use Node.js 10, or can update your code to replace this:
Copy code
//* Specify your IoT Channel to consume in the front-end.
//* This enables real-time updates in browser.
//* The API Gateway will also provide a batch request as needed.
const iotFrontEnd = "frontend";
const getIoTArn = async channel => {
  const current = await aws.getCallerIdentity({});
  const region = await aws.getRegion();
  const iotArn = `arn:aws:iot:${region.name}:${current.accountId}:topic/${channel}`;
  return iotArn;
};
//* Set your AWS IoT Endpoint - this is used to generate the IoTHarness
const IoTEndpoint = aws.iot.getEndpoint({ endpointType: "iot:Data-ATS" })
  .endpointAddress;
With this:
Copy code
//* Specify your IoT Channel to consume in the front-end.
//* This enables real-time updates in browser.
//* The API Gateway will also provide a batch request as needed.
const iotFrontEnd = "frontend";
const getIoTArn = channel => {
  const current = pulumi.output(aws.getCallerIdentity({ async: true}));
  const region = pulumi.output(aws.getRegion({}, { async: true}));
  const iotArn = pulumi.interpolate`arn:aws:iot:${region.name}:${current.accountId}:topic/${channel}`;
  return iotArn;
};
//* Set your AWS IoT Endpoint - this is used to generate the IoTHarness
const IoTEndpoint = pulumi.output(aws.iot.getEndpoint({ endpointType: "iot:Data-ATS" }, { async: true }))
  .endpointAddress;
a
Thanks for the reply! I will give this a go!