You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi all, Currently I am using serverless for deploying my code into AWS Lambda function to stop the AWS code deploy latest deployments. So I am using AWS node SDK for this and verified my code locally by using the command sls offline i works good. While deployed on AWS, the Lambda function will skip the sdk function.
Anyone, please help to resolve the problem. Here my code
`var AWS = require('aws-sdk');
AWS.config = new AWS.Config();
AWS.config.accessKeyId = "access_key";
AWS.config.secretAccessKey = "secret_key";
AWS.config.region = "region";
var codedeploy = new AWS.CodeDeploy();
module.exports.hello = async (event) => {
var params = {
applicationName: 'application_name',
deploymentGroupName: "Deployment group name",
includeOnlyStatuses: ['InProgress', 'Succeeded'],
};
codedeploy.listDeployments(params, (err, data) => {
console.log('------------ Going to list deployment----------------')
let deployment_id = data.deployments[0]
if (err) console.log(err, err.stack); // an error occurred
Hi, this is a repository containing example applications. If you are not reporting a bug in the examples, you may be better off asking support questions at https://forum.serverless.com/
Hi all, Currently I am using serverless for deploying my code into AWS Lambda function to stop the AWS code deploy latest deployments. So I am using AWS node SDK for this and verified my code locally by using the command
sls offline
i works good. While deployed on AWS, the Lambda function will skip the sdk function.Anyone, please help to resolve the problem. Here my code
`var AWS = require('aws-sdk');
AWS.config = new AWS.Config();
AWS.config.accessKeyId = "access_key";
AWS.config.secretAccessKey = "secret_key";
AWS.config.region = "region";
var codedeploy = new AWS.CodeDeploy();
module.exports.hello = async (event) => {
var params = {
applicationName: 'application_name',
deploymentGroupName: "Deployment group name",
includeOnlyStatuses: ['InProgress', 'Succeeded'],
};
codedeploy.listDeployments(params, (err, data) => {
console.log('------------ Going to list deployment----------------')
let deployment_id = data.deployments[0]
if (err) console.log(err, err.stack); // an error occurred
});
};`
The text was updated successfully, but these errors were encountered: