How to access the parameters set in AWS Batch Job Definition in my php file?
Job Definition JSON
{
"jobDefinitionName": "...",
"jobDefinitionArn": "...",
"revision": 6,
"status": "ACTIVE",
"type": "container",
"parameters": {
"category_name": "job definition category"
},
"containerProperties": {
...
}
}
This is my Dockerfile
FROM php:7.2
COPY . /usr/src/myapp
WORKDIR /usr/src/myapp
CMD [ "php", "./hello-world.php"]
This is my php file. "hello-world.php"
$parameters = getenv('parameters');
echo 'display the aws job parameters here: ' . json_encode($parameters);
I should have get the parameters set in AWS Batch Job.