pulumi up
aws stepfunctions start-execution --state-machine-arn ${output.stateMachineArn}
This is a set of Pulumi IaaS code along with a Rust application that handles the following logic.
- It writes a JSON file to a s3 bucket after reading it from 'inputs' directory
- It creates a step function that triggers a task on ECS Fargate
- An ECS Fargate task runs the
summation
rust program
- (a) The
summation
rust program reads the environmental variable for input and output s3 path, and downloads the input json file. - (b) It sums
a
andb
from the downloaded JSON file that has a format of { "a": "b": } - (c) It puts the result as a JSON file on the s3 from the given path passed as an environmental variable.
These are things I would work on if I was had more time to work on.
- Rather than using environmental variables as an input for the ECS rust program, use Step Function input parameters.
- Pass the summation result and output s3 path as an Step Function output.
- Separate out downloading an input and uploading an output as a separate step function process.
- Group Pulumi calls into Pulumi ComponentResource.
- Specify the IAM role and policy for uploading and downloading the input and output. Limit the resource to the relevant resources rather than allowing all.
- Clean up ALB