AWS - Error: local-exec provisioner error

I am a newbie to terraform and I am trying to access the packages in the S3 bucket but getting “Error: local-exec provisioner error”. lamda-deploy python script used in the below code (tf module) is used to access the packages in the AWS S3 bucket. Kindly help me to understand how to resolve this issue.


Error: local-exec provisioner error

│ with module.serverless_projects[“api/”].null_resource.serverless_deployment,

│ on serverless_project/ line 6, in resource “null_resource” “serverless_deployment”:

│ 6: provisioner “local-exec” {

│ Error running command ‘lambda-deploy api/’: exit status 1.


resource “null_resource” “serverless_deployment” {
triggers = {
source_version = data.aws_s3_object.package_object.version_id

provisioner “local-exec” {
command = “lambda-deploy ${var.package_name}”