Skip to content

Instantly share code, notes, and snippets.

@richardgrantserverless
Created April 4, 2022 16:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save richardgrantserverless/7a56e23400ce5457258f3beb352caa24 to your computer and use it in GitHub Desktop.
Save richardgrantserverless/7a56e23400ce5457258f3beb352caa24 to your computer and use it in GitHub Desktop.
'use strict';
const AWS = require('aws-sdk')
module.exports.setProvisionedConcurrency = async event => {
const params = {
FunctionName: 'MyFunctionName',
ProvisionedConcurrentExecutions: '5',
Qualifier: 'aliasname'
};
const lambda = new AWS
lambda.putProvisionedConcurrencyConfig(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment