Skip to content

Instantly share code, notes, and snippets.

View mrloop's full-sized avatar

Ewan McDougall mrloop

View GitHub Profile
@mrloop
mrloop / lambda.sh
Created March 26, 2023 20:42 — forked from luads/lambda.sh
Replay lambda from DLQ message
function replay_lambda() {
local profile=$1
local fn=$2
sqs_message="initialising..."
dlq_arn=$(aws --profile=$profile lambda get-function --function-name "$fn" | jq -r '.Configuration.DeadLetterConfig.TargetArn')
dlq=$(aws --profile=$profile sqs get-queue-url --queue-name "$(echo ${dlq_arn##*:})" --output=text)
while [ ! -z "$sqs_message" ]; do