{"action":"opened","issue":{"url":"https://api.github.com/repos/grycap/scar/issues/296","repository_url":"https://api.github.com/repos/grycap/scar","labels_url":"https://api.github.com/repos/grycap/scar/issues/296/labels{/name}","comments_url":"https://api.github.com/repos/grycap/scar/issues/296/comments","events_url":"https://api.github.com/repos/grycap/scar/issues/296/events","html_url":"https://github.com/grycap/scar/issues/296","id":384345248,"node_id":"MDU6SXNzdWUzODQzNDUyNDg=","number":296,"title":"Allow Input SandBox Files","user":{"login":"gmolto","id":7124546,"node_id":"MDQ6VXNlcjcxMjQ1NDY=","avatar_url":"https://avatars3.githubusercontent.com/u/7124546?v=4","gravatar_id":"","url":"https://api.github.com/users/gmolto","html_url":"https://github.com/gmolto","followers_url":"https://api.github.com/users/gmolto/followers","following_url":"https://api.github.com/users/gmolto/following{/other_user}","gists_url":"https://api.github.com/users/gmolto/gists{/gist_id}","starred_url":"https://api.github.com/users/gmolto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmolto/subscriptions","organizations_url":"https://api.github.com/users/gmolto/orgs","repos_url":"https://api.github.com/users/gmolto/repos","events_url":"https://api.github.com/users/gmolto/events{/privacy}","received_events_url":"https://api.github.com/users/gmolto/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-26T14:04:35Z","updated_at":"2018-11-26T14:04:35Z","closed_at":null,"author_association":"MEMBER","body":"I hit the 24-KB limit when defining a script to be executed in AWS Batch. \r\n\r\nWe could workaround this by supporting an input sandbox of files that is specified in the YAML file, is automatically upload to a specific folder in the S3 bucket and is automatically retrieved by the SCAR supervisor before executing the script.\r\n\r\nFrom the top of my head:\r\n\r\n```sh\r\nfunctions:\r\n  my-function:\r\n    image: org/repo\r\n    memory: 128\r\n    execution_mode: batch\r\n    s3:\r\n      input_bucket: my-bucket\r\n    init_script: my-script\r\n    input_sandbox:\r\n      - /path/to/local/file-or-folder\r\n```\r\nThis would cause to upload the files in `/path/to/local/file-or-folder` into `s3://my-bucket/my-function/sandbox` and define an environment variable when creating the Lambda function that this folder exists.\r\n\r\nThe supervisor would check this variable (which should be made available to the AWS Batch job as well) and retrieve whatever the contents of that S3 folder contains into the local file system so that the script running in the container can access these files. The local directory in the running container on which the files where retrieved should be made available to the script as an environment variable such as: $SCAR_INPUT_SANDBOX or simply be made available in the same local directory on which "}}
{"actor":{"display_login":"gmolto"}}