/* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ import { fileURLToPath } from "url"; // snippet-start:[sqs.JavaScript.queues.createQueueV3] import { CreateQueueCommand, SQSClient } from "@aws-sdk/client-sqs"; const client = new SQSClient({}); const SQS_QUEUE_NAME = "test-queue"; export const main = async (sqsQueueName = SQS_QUEUE_NAME) => { const command = new CreateQueueCommand({ QueueName: sqsQueueName, Attributes: { DelaySeconds: "60", MessageRetentionPeriod: "86400", }, }); const response = await client.send(command); console.log(response); return response; }; // snippet-end:[sqs.JavaScript.queues.createQueueV3] // Invoke main function if this file was run directly. if (process.argv[1] === fileURLToPath(import.meta.url)) { main(); }