agent-ec2

aws-ia/agent-ec2/prefect

Terraform Module HCL PREFECT ✓ Verified

Terraform module for deploying the Prefect Agent on AWS EC2

Install
module "agent-ec2" {
source = "aws-ia/agent-ec2/prefect"
version = "1.0.2"
}
⭐ Source on GitHub 📦 Registry page
README

Prefect Docker Agent on AWS EC2 Module The Prefect Agent is a lightweight process that orchestrates flow runs. It is responsible for starting and monitoring flow runs. During operation the agent process queries the Prefect API for any scheduled flow runs, and allocates resources for them on their respective deployment platforms. This Terraform module deploys the infrastructure required to run the Prefect Docker agent on AWS EC2. By default, it deploys AWS VPC Networking resources, which are best practice for Prefect configuration. You can disable the default networking as show in the bring your own network example. !architecture diagram Prerequisites 1. Generate an API service account key for the agent 2. Store the API key in AWS Secrets Manager in the console, or using the following CLI c

Inputs (24)
NameTypeDescriptionDefault
key_namestringprivate pem key to apply to the prefect instances required
iam_role_idstringiam role to attach to the prefect launch template, if not provided, a default on required
security_group_idslist(string)security group(s) to attach to the prefect launch template, if not provided, a d required
enable_detailed_monitoringboolenable detailed monitoring on the prefect agent (1 min intervals)true
enable_single_nat_gatewayboolenable a shared nat gateway within your vpcfalse
attach_ssm_policyboolAttach ssm policy to the prefect iam roletrue
instance_typestringAWS instance type"t3.medium"
ami_idstringami to launch the ec2 instance from, windows images not supported""
max_capacitynumberthe maximum size of the auto scaling group1
enable_local_flow_logsboolenables flow logs to output locally on the agentfalse
vpc_idstringid of the vpc to deploy the prefect agent into""
desired_capacitynumberthe number of prefect agents that should be running in the auto scaling group1
custom_tagsmap(any)custom tags which can be passed on to the AWS resources. they should be key valu{}
prefect_api_key_secret_namestringid of aws secrets manager secret for prefect api key"prefect-api-key"
prefect_secret_keystringkey of aws secrets manager secret for prefect api key"key"
agent_automation_configstringconfig id to apply to the prefect agent to enable cloud automations""
disable_image_pullingstringdisables the prefect agents ability to pull non-local imagesfalse
deploy_networkbooldeploy lightweight network to host the prefect agenttrue
vpc_cidrstringcidr range to apply to your vpc"192.168.0.0/24"
linux_typestringtype of linux instance"linux_amd64"
min_capacitynumberthe minimum size of the auto scaling group1
prefect_api_addressstringthe api address that the prefect agent queries for pending flow runs"https://api.prefect.io"
prefect_labelsstringlabels to apply to the prefect agent"[]"
Outputs (1)
prefect_role_id — iam role id of the role attached to the prefect launch template
Resources (8)
aws_autoscaling_groupaws_iam_instance_profileaws_iam_policy_attachmentaws_iam_roleaws_iam_role_policyaws_launch_templateaws_security_groupaws_security_group_rule
Details
FrameworkTerraform Module
LanguageHCL
Version1.0.2
Cloud PREFECT
★ Stars13
Forks7
Total downloads623
Inputs24
Outputs1
Resources8
Examples4
LicenseApache-2.0
Namespaceaws-ia
Updated