This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FUNCTION_NAME=dev-earlybird-edge-image-resize | |
for region in $(aws --output text ec2 describe-regions | cut -f 4) | |
do | |
for loggroup in $(aws --output text logs describe-log-groups --log-group-name "/aws/lambda/us-east-1.$FUNCTION_NAME" --region $region --query 'logGroups[].logGroupName') | |
do | |
echo $region $loggroup | |
done | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"resource": "/webhooks/mux", | |
"path": "/webhooks/mux", | |
"httpMethod": "POST", | |
"headers": null, | |
"multiValueHeaders": null, | |
"queryStringParameters": null, | |
"multiValueQueryStringParameters": null, | |
"pathParameters": null, | |
"stageVariables": null, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FUNCTION_NAME=function_name_without_qualifiers | |
for region in $(aws --output text ec2 describe-regions | cut -f 3) | |
do | |
for loggroup in $(aws --output text logs describe-log-groups --log-group-name "/aws/lambda/us-east-1.$FUNCTION_NAME" --region $region --query 'logGroups[].logGroupName') | |
do | |
echo $region $loggroup | |
done | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
var __assign = (this && this.__assign) || function () { | |
__assign = Object.assign || function (t) { | |
for (var s, i = 1, n = arguments.length; i < n; i++) { | |
s = arguments[i]; | |
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | |
t[p] = s[p]; | |
} | |
return t; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
var __assign = (this && this.__assign) || function () { | |
__assign = Object.assign || function(t) { | |
for (var s, i = 1, n = arguments.length; i < n; i++) { | |
s = arguments[i]; | |
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | |
t[p] = s[p]; | |
} | |
return t; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const rdsUtils = { | |
toJsonObject(value) { | |
const results = value.sqlStatementResults; | |
const rs = []; | |
results.forEach((result) => { | |
const { records, columnMetadata } = result; | |
const items = []; | |
records.forEach((record) => { | |
const r = {}; | |
let index = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export { TemplateSentError, Unauthorized, ValidateError } from './errors'; | |
import { generalUtils } from './general-utils'; | |
import { dynamodbUtils } from './dynamodb-utils'; | |
import { listUtils } from './list-utils'; | |
import { mapUtils } from './map-utils'; | |
import { rdsUtils } from './rds-utils'; | |
import { transformUtils } from './transform'; | |
import { time } from './time'; | |
import { GraphQLResolveInfo } from 'graphql'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
var __assign = (this && this.__assign) || function () { | |
__assign = Object.assign || function(t) { | |
for (var s, i = 1, n = arguments.length; i < n; i++) { | |
s = arguments[i]; | |
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | |
t[p] = s[p]; | |
} | |
return t; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.handler = async (event, context) => { | |
console.log('-- event', JSON.stringify(event)) | |
if (event.request.privateChallengeParameters.answer === event.request.challengeAnswer) { | |
event.response.answerCorrect = true; | |
} else { | |
event.response.answerCorrect = false; | |
} | |
return event; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.handler = (event, context, callback) => { | |
console.log('-- event', JSON.stringify(event)) | |
if (!event.request.session || event.request.session.length === 0) { | |
event.response.publicChallengeParameters = { | |
publicParam: "url/123.jpg", // whatever you want | |
}; | |
// Something code that send the PIN to phone | |
event.response.privateChallengeParameters = { | |
answer: "1234", // PIN |
NewerOlder