Closed phbissiwu closed 2 years ago
Thanks for reaching out @phbissiwu, Agent does not propagate process environment variables to aws:runshellscript. Here is example output from print environment variables within AWS-RunShellScript execution:
AWS_SSM_INSTANCE_ID=<InstanceId>
_=/usr/bin/env
LANG=en_US.UTF-8
AWS_SSM_PLATFORM_NAME=<PlatformName>
INVOCATION_ID=<InvocationId>
AWS_SSM_PLATFORM_VERSION=<PlatformVersion>
PWD=/usr/bin
JOURNAL_STREAM=<JournalStream>
SSM_COMMAND_ID=<commandId>
SHLVL=2
AWS_SSM_REGION_NAME=us-east-1
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
You can see what variables are available in your script by running env
in AWS-RunShellScript.
I am working on something and I am trying to call some environment variables with SSM run command using AWS-RunShellScript. but for some reason, this returns nothing. Please how can I call environment variables with SSM AWS-RunShellScript?
Thank you.