sparse-intern-71089
03/23/2020, 6:08 PMwhite-balloon-205
node --version
?astonishing-gpu-12842
03/23/2020, 9:10 PMastonishing-gpu-12842
03/23/2020, 9:10 PMastonishing-gpu-12842
03/23/2020, 9:11 PMwhite-balloon-205
//* 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:
//* 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;
astonishing-gpu-12842
03/24/2020, 4:05 AM