I'm setting up a data pipeline in aws. and plan to use a "getting started using ShellCommandActivity" template to run a shell script. how can i pass credentials stored in ssm parameter as a parameter to this script.
Asked
Active
Viewed 552 times
1 Answers
0
I haven't verified that, but ShellCommandActivity is similar to ShellScriptConfig from what I can tell. Based on the examples provided for these commands, I would think that you could pass the ssm param name as follows:
{
"id" : "CreateDirectory",
"type" : "ShellCommandActivity",
"command" : "your-script.sh <name-of-your-parameter>"
}
or
{
"id" : "CreateDirectory",
"type" : "ShellCommandActivity",
"scriptUri" : "s3://my-bucket/example.sh",
"scriptArgument" : ["<name-of-your-parameter>"]
}
and in the example.sh
you would use $1
to refer to the value of the argument passed.

Marcin
- 215,873
- 14
- 235
- 294