aws-sam-cli icon indicating copy to clipboard operation
aws-sam-cli copied to clipboard

Env variables not showing up

Open spnce opened this issue 8 years ago • 1 comments

template.yaml: AWSTemplateFormatVersion: '2010-09-09' Transform: 'AWS::Serverless-2016-10-31' Resources: FileMover: Type: 'AWS::Serverless::Function' Properties: Handler: com.radar.search.FileMover::move Runtime: java8 Timeout: 10 CodeUri: './build/distributions/search.zip' Environment: Variables: ES_HOST: "some_ec2_instance"

prop_file.json: { "FileMover": { "ES_HOST": "host" } }

command: sam local invoke -e event.json -n prop_file.json "FileMover"

During execution, System.getProperty("ES_HOST") returns null. What am I missing?

spnce avatar Dec 29 '17 03:12 spnce

This should work as of v0.3.0

sanathkr avatar Jun 01 '18 00:06 sanathkr