title: terraform - how to add s3 Object Created trigger for lambda
body: <p>How do I add a trigger to aws lambda using terraform?
  the desired trigger is s3, object created all.</p>
  
  <p>my terraform source code arouond the lambda is:</p>
  
  <pre><code>module "s3-object-created-lambda" {
    source = "../../../../../modules/lambda"
    s3_bucket = "${var.s3_lambda_bucket}"
    s3_key = "${var.s3_lambda_key}"
    name = "${var.lambda_some_name}"
    handler = "code.handler"
    env = {
      lambda_name = "${var.lambda_base_name}"
      lambda_version = "${var.lambda_version}"
    }
  }
  </code></pre>
  
  <p>trying to figure out how do I add the trigger.
  via the aws console it is super simple.</p>