{"size": 641, "ext": "js", "max_stars_repo_path": "thumbnail-handler/service/sqsService.js", "max_stars_repo_name": "bentoco/nanoservices-serverless-poe", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "thumbnail-handler/service/sqsService.js", "max_issues_repo_name": "bentoco/nanoservices-serverless-poe", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "thumbnail-handler/service/sqsService.js", "max_forks_repo_name": "bentoco/nanoservices-serverless-poe", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 21.3666666667, "max_line_length": 99, "alphanum_fraction": 0.4617784711}
const AWS = require('aws-sdk')

AWS.config.update({
    region: 'us-east-1',
})

const sqs = new AWS.SQS()

const putMessage = (message) => {
    return new Promise((res, rej) => {
        sqs.sendMessage(
            {
                QueueUrl:
                    'https://sqs.us-east-1.amazonaws.com/661087684535/post-processing-image-queue',
                MessageBody: JSON.stringify(message),
            },
            (err, data) => {
                if (err) {
                    return rej(err)
                }
                return res(data)
            }
        )
    })
}

module.exports = {
    putMessage: putMessage,
}
