# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: MIT-0 AWSTemplateFormatVersion: "2010-09-09" Transform: AWS::Serverless-2016-10-31 Description: > serverless-image-catalog-starter Parameters: ModeratorEmailAddress: Type: String Default: moderator@example.com Description: Enter the email address that will receive content moderation alerts. Resources: ImageCatalogStateMachine: Type: AWS::Serverless::StateMachine Properties: Name: image-catalog-workflow-starter DefinitionUri: statemachine/image-catalog-starter.asl.json Policies: - RekognitionDetectOnlyPolicy: {} - S3ReadPolicy: BucketName: !Ref IngestionBucket - SNSPublishMessagePolicy: TopicName: !GetAtt ModeratorSNSTopic.TopicName - DynamoDBWritePolicy: TableName: !Ref CatalogTable IngestionBucket: Type: AWS::S3::Bucket Properties: BucketEncryption: ServerSideEncryptionConfiguration: - ServerSideEncryptionByDefault: SSEAlgorithm: "AES256" CatalogTable: Type: AWS::Serverless::SimpleTable Properties: PrimaryKey: Name: Id Type: String ProvisionedThroughput: ReadCapacityUnits: 1 WriteCapacityUnits: 1 ModeratorSNSTopic: Type: AWS::SNS::Topic Properties: KmsMasterKeyId: "alias/aws/sns" Subscription: - Endpoint: !Ref ModeratorEmailAddress Protocol: "email" Outputs: IngestionBucket: Description: "S3 bucket name" Value: !Ref IngestionBucket CatalogTable: Description: "DynamoDB table name" Value: !Ref CatalogTable ModeratorSNSTopic: Description: "SNS topic ARN" Value: !Ref ModeratorSNSTopic