aws-sam-cli
aws-sam-cli copied to clipboard
Env variables not showing up
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?
This should work as of v0.3.0