AWSTemplateFormatVersion: "2010-09-09" Description: Deploys the Voicemail Express SES email templates and consolidated Lambda for managing templates. Parameters: AWSRegion: Type: String ConnectInstanceAlias: Type: String EXPDevBucketPrefix: Type: String EXPTemplateVersion: Type: String LambdaLoggingLevel: Type: String VMXCoreRoleArn: Type: String Resources: VMEmailDefaultQueueTemplate: Type: 'AWS::SES::Template' Properties: Template: TemplateName: !Join - '' - - 'default_queue_' - !Ref ConnectInstanceAlias SubjectPart: 'Voicemail from {{callback_number}}' TextPart: 'A voicemail was left for the {{entity_name}} queue from {{callback_number}}. You can listen to the message via the following URL: {{presigned_url}}' HtmlPart: '

{{entity_name}} Voicemail

There is a voicemail from {{callback_number}}.

Listen to the voicemail.

Voicemail transcription

{{transcript_contents}}

' VMEmailDefaultAgentTemplate: Type: 'AWS::SES::Template' Properties: Template: TemplateName: !Join - '' - - 'default_agent_' - !Ref ConnectInstanceAlias SubjectPart: 'Voicemail from {{callback_number}}' TextPart: 'Dear {{entity_name}}, A voicemail was left for you from {{callback_number}}. You can listen to the message via the following URL: {{presigned_url}}' HtmlPart: '

Voicemail for {{entity_name}}

There is a voicemail from {{callback_number}}.

Listen to the voicemail.

Voicemail transcription

{{transcript_contents}}

' VMXSESTools: Type: AWS::Lambda::Function Properties: Code: S3Bucket: !Join - '' - - !Ref EXPDevBucketPrefix - 'connectbd-sc-' - !Ref AWSRegion S3Key: !Join - '' - - 'vmx/' - !Ref EXPTemplateVersion - /zip/vmx_ses_template_tool.py.zip Description: Provides prebuilt function to manage email templates Environment: Variables: lambda_logging_level: Ref: LambdaLoggingLevel package_version: Ref: EXPTemplateVersion FunctionName: !Join - '' - - 'VMXSESTool-' - !Ref ConnectInstanceAlias Handler: vmx_ses_template_tool.lambda_handler Role: !Ref VMXCoreRoleArn Runtime: python3.9 Timeout: 30 Outputs: VMEmailDefaultAgentTemplate: Description: Default agent email template Value: !Ref VMEmailDefaultAgentTemplate VMEmailDefaultQueueTemplate: Description: Default queue email template Value: !Ref VMEmailDefaultQueueTemplate