I am signing a url for iot core as follows:
const aws = new aws4.RequestSigner(
{
host: AWS_IOT_ENDPOINT,
path: "/mqtt",
service: "iotdevicegateway",
region: "",
signQuery: true,
},
{
accessKeyId: "",
secretAccessKey: "",
}
);
let { path } = aws.sign();
const url = wss://${AWS_IOT_ENDPOINT}${path}
But I need to lengthen the time in which the url expires to be able to connect again to the socket, I have tried some things like:
const awsDate = new Date();
awsDate.setMinutes(awsDate.getMinutes() + 20);
const isoDate = awsDate.toISOString().replace(/[:\-]|\.\d{3}/g, "");
aws.datetime = isoDate;
Change path parameter:
path: "/mqtt?X-Amz-Expires=3600",
And it hasn't worked, any ideas?
I am signing a url for iot core as follows:
But I need to lengthen the time in which the url expires to be able to connect again to the socket, I have tried some things like:
Change path parameter:
And it hasn't worked, any ideas?