Skip to content

Instantly share code, notes, and snippets.

@varqasim
varqasim / Dockerfile
Created January 24, 2021 08:22
HAProxy + AWS CloudMap + AWS ECS
FROM haproxy:2.3
COPY haproxy.cfg /usr/local/etc/haproxy/haproxy.cfg
@varqasim
varqasim / haproxy.js
Created January 26, 2021 17:33
Pulumi + ECR + Docker
var pulumi = require("@pulumi/pulumi");
var aws = require("@pulumi/aws");
var awsx = require("@pulumi/awsx");
var stackName =
pulumi.getStack().charAt(0).toUpperCase() + pulumi.getStack().slice(1);
var ecrRepo = new aws.ecr.Repository("haproxy", {
mageScanningConfiguration: {
scanOnPush: true,
@varqasim
varqasim / helper.ts
Created September 8, 2023 17:10
Get AWS SQS URL from SQS Arn
export function getQueueUrl(accountId: string, queueArn: string) {
const regex = new RegExp(`${accountId}:`);
const queueName = queueArn.split(regex)[1];
return `https://sqs.${process.env.AWS_REGION}.amazonaws.com/${accountId}/${queueName}`
}