{"id":16696800,"url":"https://github.com/atry/aws-ec2-instance-pool","last_synced_at":"2026-02-12T02:09:16.145Z","repository":{"id":28741107,"uuid":"32262594","full_name":"Atry/aws-ec2-instance-pool","owner":"Atry","description":"AWS EC2 instance pool","archived":false,"fork":false,"pushed_at":"2015-03-20T15:18:27.000Z","size":184,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-02T18:46:08.444Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Haxe","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Atry.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-15T13:46:01.000Z","updated_at":"2017-09-09T11:04:26.000Z","dependencies_parsed_at":"2022-08-03T01:00:14.923Z","dependency_job_id":null,"html_url":"https://github.com/Atry/aws-ec2-instance-pool","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Atry/aws-ec2-instance-pool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atry%2Faws-ec2-instance-pool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atry%2Faws-ec2-instance-pool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atry%2Faws-ec2-instance-pool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atry%2Faws-ec2-instance-pool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Atry","download_url":"https://codeload.github.com/Atry/aws-ec2-instance-pool/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Atry%2Faws-ec2-instance-pool/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29354701,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T01:03:07.613Z","status":"online","status_checked_at":"2026-02-12T02:00:06.911Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T17:44:51.809Z","updated_at":"2026-02-12T02:09:16.114Z","avatar_url":"https://github.com/Atry.png","language":"Haxe","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aws-ec2-instance-pool\n\n**aws-ec2-instance-pool** is a cross-platform [Haxe](http://haxe.org/) library that manages AWS EC2 instances' lifecycles on demand.\n\n## Installation\n\n```\nhaxelib install aws-ec2-instance-pool\n```\n\n## Usage\n\n### Creating a `Ec2InstancePool`\n``` haxe\n#if nodejs\n  // awsEc2InstancePool.EC2 is compatible with AWS SDK for JavaScript.\n  // See https://github.com/aws/aws-sdk-js\n  var AWS = js.Node.require(\"aws-sdk\");\n  var ec2:awsEc2InstancePool.EC2 = Type.createInstance(AWS.EC2, [{}]);\n#else\n  // You need to adapt AWS SDK to awsEc2InstancePool.EC2,\n  // if you are on a platform other than JavaScript.\n  var ec2:awsEc2InstancePool.EC2 = new YourOwnAwsEc2ApiImplementation();\n#end\n\nvar retryInterval = 15000;\nvar idleTimeout = 300000;\nvar terminationTimeout = 60000;\nvar ec2InstanceOptions = {\n  ImageId: 'ami-xxxxxxxx',\n  InstanceType: 't1.micro',\n  MaxCount: 1,\n  MinCount: 1,\n  SecurityGroups: [ \"launch-wizard-1\" ]\n};\nvar maxWorkloads = 5;\n\nvar pool = new awsEc2InstancePool.Ec2InstancePool(\n  function() {\n    return new awsEc2InstancePool.Ec2InstanceLifecycle(\n      ec2,\n      retryInterval,\n      idleTimeout,\n      terminationTimeout,\n      ec2InstanceOptions);\n  },\n  maxWorkloads);\n```\n\n### Using an EC2 instance\n\n``` haxe\n// Acquire the EC2 instance before using it\npool.acquire(function(instanceIndex:Int, instanceHostName:String):Void {\n\n  // Using the EC2 instance\n  ...\n\n  // Release the EC2 instance after using it\n  pool.release(instanceIndex);\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatry%2Faws-ec2-instance-pool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatry%2Faws-ec2-instance-pool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatry%2Faws-ec2-instance-pool/lists"}