Carpathia is a service for creating and initializing EC2 instances within NGAP (NASA General Applications Platform) AWS environments. Carpathia's also performs automatic rotations of EC2 instances to keep up with NGAP AMI security updates automagically.
zip carpathia_lambda_function.zip carpathia_lambda_function.pyterraform initterraform plan -var-file="envs/sandbox.tfvars"aws lambda invoke --function-name LAMBDA_FUNCTION response.jsonflowchart TD;
EventBridge["AWS EventBridge Rule"] -->|Invokes| Lambda["AWS Lambda Function"]
Lambda -->|Store Logs| CW["AWS CloudWatch LogGroup"]
Lambda -->|Fetch AMI ID Parameter| SM["AWS Systems Manager"]
Lambda -->|Create or Update| LT["AWS Launch Template"]
LT -->|Create or Update| ASG["AWS Auto Scaling Group"]
ASG -->|Find Subnet IDs| Subnets["AWS Subnets"]
Subnets -->|Attach to ASG| ASG
ASG -->|Launch New Instances| EC2["AWS EC2 Instances"]
flowchart TD;
E["/persistent/"]
F["/var/log/podaac/"]
G["/bootstrap/"]
H["/home/ssm-user/"]
subgraph AWS-S3
B["var/log/podaac/"]
C["bootstrap/"]
D["home/ssm-user/"]
end
subgraph EC2
F --> B
G --> C
H --> D
E -->AWS-S3
end