I am trying to run aws create lambda function. It goes as follows -
eval $(aws lambda create-function \
--function-name $FUNCTION_NAME \
--runtime $RUNTIME \
--role $ROLE \
--handler $HANDLER \
--region $REGION \
--zip-file $ZIP_FILE \
--profile $PROFILE \
--environment $env_variables)
All the variables come from command line. It is failing for env_variables. This gets constructed as -
env_variables="Variables={INPUT=${DAYS}}"
where DAYS is actually "20 days"
How can I avoid this space and pass my command successfully.
env_variables="Variables={INPUT=20 days}"
which means"Variables={INPUT=20 days}"
is a json sting fed to environment option of the command. I tried DAYS="'45 days'". Does not work. – Aniket Thakur Nov 04 '17 at 13:55