diff --git a/index.mjs b/index.mjs index cc9e9fd..0bfdb82 100644 --- a/index.mjs +++ b/index.mjs @@ -6,15 +6,17 @@ import { GetSecretValueCommand, } from "@aws-sdk/client-secrets-manager"; export const handler = async (event) => { + console.info("Event: ", event); let result = "did not send"; if (event.subject.includes("You have deliveries") || event.subject.includes("You have a delivery")) { // Trigger home notification - console.info("Matched Subject, pull key"); + console.info("Matched Subject"); const command = `ssh ${process.env.INTERNAL_HOST} "/usr/bin/tmux neww -d \"/usr/bin/mplayer '${process.env.INTERNAL_FILE}'\""`; const tempFile = `./${v4()}.key`; const keyClient = new SecretsManagerClient({ region: "us-west-2" }); let keyResponse; try { + console.info("Get Key"); keyResponse = await keyClient.send(new GetSecretValueCommand({ SecretId: process.env.TRIGGER_SECRET }));