--timeout
might help, as could adjusting --memory-size
(you get a higher % CPU with more memory, so your function runs faster)
Hi,
I've 2 stages named /latest & /uat. I'm planning to route all project level api's via /latest stage & API Gateway resources(api endpoints) through /uat stage.
I'm using the following code in app.js file as a middleware to detect path name for both the stages:
app.use(function (req, res, next) {
console.log("CHECK PATH:::", req.path);
console.log("CHECK REQUEST OBJECT::", req.body);
next()
})
Project level api paths are getting traced in console logs, but the API gateway endpoints located in /uat are not getting traced here.
Is it possible to trace which API Gateway endpoint is getting called in app.js?
Thanks.
Hello,
currently working on the chatbot tutorial (https://claudiajs.com/tutorials/hello-world-chatbot.html) in the skype bot configuration in the last line. What exactly is the webhook url? Is it the url that ends with latest/skype? Also it seems like the link to the skype bot s page is outdated. As there an explaination somewhere, how to create a skype bot with the new process?
Thanks a lot for your help.
Best
Jannis
--no-optional-dependencies
async function zipData(content: string): Promise<Buffer> {
return new Promise((resolve, reject) => {
const filename = `/tmp/${new Date().valueOf()}.zip`;
const dataBuffer = Buffer.alloc(content.length, content);
const output = fs.createWriteStream(filename);
const archive = Archiver('zip', {
zlib: { level: 9 },
});
output.on('close', () => {
async function asyncWorker(): Promise<Buffer> {
return await readFileAsync(filename);
}
asyncWorker()
.then((output) => {
return resolve(output);
})
.catch((err) => {
return reject(err);
});
});
archive.on('error', (err) => {
log.error('zipping archive error', err);
return reject(err);
});
archive.pipe(output);
archive.append(dataBuffer, { name: 'data.csv' });
archive.finalize();
});
}
#!/usr/bin/env bash
mkdir -p ~/.aws
cat > ~/.aws/credentials << EOF
[deploy]
aws_access_key_id=$AWS_ACCESS_KEY_ID
aws_secret_access_key=$AWS_SECRET_ACCESS_KEY
EOF
export AWS_PROFILE=deploy
./node_modules/.bin/claudia update --no-optional-dependencies --version live
validating package npm dedupe -q --no-package-lock
npm ERR! code EEXIST
npm ERR! Refusing to delete /tmp/LADlqq/xxx/package/node_modules/claudia/node_modules/.bin/mkdirp: is outside /tmp/LADlqq/xxx/package/node_modules/claudia/node_modules/mkdirp and not a link
claudia update --source dist --handler scripts/lambda.handler --use-local-dependencies --role api-deployment-executor --use-s3-bucket lambda-uploads --memory 1024 --timeout 300 --deploy-proxy-api --region eu-central-1 --config bin/deploy/claudia-dev.json --name app-api-staging