AWSTemplateFormatVersion: "2010-09-09" Transform: AWS::Serverless-2016-10-31 Description: > SAM-CallCenterApp SAM to deploy Lambda Functions and Step Functions State Machine as described in https://aws.amazon.com/getting-started/hands-on/create-a-serverless-workflow-step-functions-lambda/ Resources: CallCenterStateMachine: Type: AWS::Serverless::StateMachine # More info about State Machine Resource: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-resource-statemachine.html Properties: DefinitionUri: statemachines/CallCenterStateMachine.asl.json DefinitionSubstitutions: OpenCaseFunctionArn: !GetAtt OpenCaseFunction.Arn AssignCaseFunctionArn: !GetAtt AssignCaseFunction.Arn WorkOnCaseFunctionArn: !GetAtt WorkOnCaseFunction.Arn CloseCaseFunctionArn: !GetAtt CloseCaseFunction.Arn EscalateCaseFunctionArn: !GetAtt EscalateCaseFunction.Arn Policies: # Find out more about SAM policy templates: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-policy-templates.html - LambdaInvokePolicy: FunctionName: !Ref OpenCaseFunction - LambdaInvokePolicy: FunctionName: !Ref AssignCaseFunction - LambdaInvokePolicy: FunctionName: !Ref WorkOnCaseFunction - LambdaInvokePolicy: FunctionName: !Ref CloseCaseFunctionp - LambdaInvokePolicy: FunctionName: !Ref EscalateCaseFunction OpenCaseFunction: Type: AWS::Serverless::Function # More info about Function Resource: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-resource-function.html Properties: CodeUri: functions/open-case/ Handler: app.handler #app.lambdaHandler Runtime: nodejs12.x Role: arn:aws:iam::952941930635:role/service-role/OpenCaseFunction-role-53xmbdiv AssignCaseFunction: Type: AWS::Serverless::Function Properties: CodeUri: functions/assign-case/ Handler: app.handler #app.lambdaHandler Runtime: nodejs12.x Role: arn:aws:iam::952941930635:role/service-role/OpenCaseFunction-role-53xmbdiv WorkOnCaseFunction: Type: AWS::Serverless::Function Properties: CodeUri: functions/work-on-case/ Handler: app.handler #app.lambdaHandler Runtime: nodejs12.x Role: arn:aws:iam::952941930635:role/service-role/OpenCaseFunction-role-53xmbdiv CloseCaseFunction: Type: AWS::Serverless::Function Properties: CodeUri: functions/close-case/ Handler: app.handler #app.lambdaHandler Runtime: nodejs12.x Role: arn:aws:iam::952941930635:role/service-role/OpenCaseFunction-role-53xmbdiv EscalateCaseFunction: Type: AWS::Serverless::Function Properties: CodeUri: functions/escalate-case/ Handler: app.handler #app.lambdaHandler Runtime: nodejs12.x Role: arn:aws:iam::952941930635:role/service-role/OpenCaseFunction-role-53xmbdiv # Outputs: # # https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-specification-generated-resources.html # CallCenterStateMachineArn: # Description: "Call Center state machine ARN" # Value: !Ref CallCenterStateMachine # CallCenterStateMachineRole: # Description: "IAM Role created for Call Center state machine based on the specified SAM Policy Templates" # Value: !GetAtt CallCenterStateMachineRole.Arn