To run Nextflow on AWS, we need to integrate it with AWS Batch which act as an executor for Nextflow on AWS. However, there are some settings which needs to be done in AWS batch such as creation and configuration of Job Queue and Compute environment.
Here the above code does all these configurations based on the below parameters which should be passed to the code as arguments.
-
Launch Template Name - A launch template contains the parameters to launch an instance. This launch template will be used by AWS Batch to trigger executor EC2 instances.
-
Key name – Any instance triggered using the code or AWS can be accessed using this provided key pair.
-
Region Name – AWS region to launch ec2 instances.
-
S3_bucket – The master S3 bucket.
-
S3_logging_dir – The S3 location where nextflow should store logs.
-
S3_result – The S3 location where Nextflow divert the output reports. *
-
max_vCpus – The maximum number of vCPUs for compute environment.
-
compute_envrionment_name – The name for compute environment which the code will create.
-
instance_role – The instance role which should be attached ec2 instances triggered by both code and AWS batch.
-
security_groupId – The security group which should be attached ec2 instances triggered by both code and AWS batch.
-
job_queue_name – The name for job queue.
-
s3_data – The exact s3 location where data required for Nextflow is situated.
-
script_name – The Nextflow script name.
-
config_file_name – The configuration file name to trigger Nextflow script.
-
subnet1 – Subnet to be given to compute environment to launch EC2 instances.
-
subnet2 – Subnet to be given to compute environment to launch EC2 instances.
-
subnet3 - Subnet to be given to compute environment to launch EC2 instances.
-
subnet4 – Subnet to be given to compute environment to launch EC2 instances.
-
subnet5 – Subnet to be given to compute environment to launch EC2 instances.
-
subnet6- Subnet to be given to compute environment to launch EC2 instances.
-
result_location – The S3 location where Nextflow divert the output reports.
-
s3fs_mount – The name for s3fs mount on ec2 instance.
-
allocationStrategy – The allocationStrategy to launch ec2 instance (or the name of EC2 instance)