Good evening. The question is about dotnet lambda deploy-serverless command. This command is used to deploy .Net apps to AWS Lambda service using AWS CloudFormation. When I try to run this command in Jenkins pipeline in stage:
stage('Update AWS lambda') {
steps {
bat "cd MyFinance.Api"
bat "dotnet lambda deploy-serverless"
}
}
I receive errors about missing parameters:
C:\Program Files (x86)\Jenkins\workspace\MyFinanceApiPipeline>dotnet lambda deploy-serverless Amazon Lambda Tools for .NET Core applications (4.1.0) Project Home: https://github.com/aws/aws-extensions-for-dotnet-cli, https://github.com/aws/aws-lambda-dotnet Enter CloudFormation Stack Name: (CloudFormation stack name for an AWS Serverless application) Enter S3 Bucket: (S3 bucket to upload the build output) Enter CloudFormation Template: (Path to the CloudFormation template) Enter AWS Region: (The region to connect to AWS services, if not set region will be detected from the environment.) Can not determine AWS region. Either configure a default region or use the --region option.
But if I run this command via PowerShell in my project folder everything is ok. Near is a screenshot of command execution results. Successful command execution in PowerShell So, how to run this without parameters in Jenkins pipeline (like I made via PowerShell)? Thank you in advance.
serverless.templatefile for some reason ... what happens if you specify it explicitly usingdotnet lambda deploy-serverless -pl [WorkingDirectory]\MyFinance.Api -t serverless.template? - Ed Graham