Skip to content

sandroschmid/aws-image-moderation-workflow

Repository files navigation

AWS Serverless Demo

Demo application where a file upload to S3 indirectly triggers a workflow which will to some image recognition, either automatically "approve" the image or notify a moderator and, finally, for approved images, will create thumbnails and grayscale images.

Development

The SAM CLI beta feature for esbuild enables native TypeScript support for Lambda. The normal SAM build will thus also compile the functions. Run the following commands:

Building and Deploying

The SAM CLI beta feature for esbuild enables native TypeScript support for Lambda. The normal SAM build will thus also compile the functions. Run the following commands:

  • sam validate to verify the validity of the SAM template.
  • sam build to compile the Lambda functions and SAM template.
  • sam deploy to deploy the CloudFormation stack. Add --guided for the initial deployment or to update the saved deployment configuration in samconfig.toml.

StepFunction Activities

  • Once triggered, retrieve active tasks:

    aws stepfunctions get-activity-task --activity-arn arn:aws:states:<region>:<account>:activity:ImageModerationActivity
  • Either approve

    aws stepfunctions send-task-success --task-output="{\"allowed\":true}" --task-token="<token>"

About

AWS serverless demo application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published