# 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: > jsonpath-lambda Sample SAM Template for jsonpath-lambda # More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst Globals: Function: Timeout: 5 Resources: ################################################################################ # AWS Lambda function ################################################################################ JSONPathLambdaFunction: Type: AWS::Serverless::Function Properties: CodeUri: functions/jsonpath-lambda/ Handler: jsonpath-lambda Runtime: go1.x ################################################################################ # AWS Step Functions state machines ################################################################################ ArraysStateMachine: Type: AWS::Serverless::StateMachine Properties: Name: Arrays Role: !GetAtt NoOpWorkflowRole.Arn DefinitionUri: statemachine/arrays.asl.json EntireInputToLambdaStateMachine: Type: AWS::Serverless::StateMachine Properties: Name: Entire-Input-To-Lambda Policies: - LambdaInvokePolicy: FunctionName: !Ref JSONPathLambdaFunction DefinitionUri: statemachine/entire-input-to-lambda.asl.json DefinitionSubstitutions: JSONPathLambdaFunction: !GetAtt JSONPathLambdaFunction.Arn LambdaWithResultAndOutputPathsStateMachine: Type: AWS::Serverless::StateMachine Properties: Name: Lambda-With-Result-And-Output-Paths Policies: - LambdaInvokePolicy: FunctionName: !Ref JSONPathLambdaFunction DefinitionUri: statemachine/lambda-with-result-and-output-paths.asl.json DefinitionSubstitutions: JSONPathLambdaFunction: !GetAtt JSONPathLambdaFunction.Arn LambdaWithResultPathAndInputParameterStateMachine: Type: AWS::Serverless::StateMachine Properties: Name: Lambda-With-Result-Path-And-Input-Parameter Policies: - LambdaInvokePolicy: FunctionName: !Ref JSONPathLambdaFunction DefinitionUri: statemachine/lambda-with-result-path-and-input-parameter.asl.json DefinitionSubstitutions: JSONPathLambdaFunction: !GetAtt JSONPathLambdaFunction.Arn LambdaWithResultPathStateMachine: Type: AWS::Serverless::StateMachine Properties: Name: Lambda-With-Result-Path Policies: - LambdaInvokePolicy: FunctionName: !Ref JSONPathLambdaFunction DefinitionUri: statemachine/lambda-with-result-path.asl.json DefinitionSubstitutions: JSONPathLambdaFunction: !GetAtt JSONPathLambdaFunction.Arn PassStateManipulationStateMachine: Type: AWS::Serverless::StateMachine Properties: Name: Pass-State-Manipulation Policies: - LambdaInvokePolicy: FunctionName: !Ref JSONPathLambdaFunction DefinitionUri: statemachine/pass-state-manipulation.asl.json DefinitionSubstitutions: JSONPathLambdaFunction: !GetAtt JSONPathLambdaFunction.Arn SimplePassStateMachine: Type: AWS::Serverless::StateMachine Properties: Name: Simple-Pass-State Role: !GetAtt NoOpWorkflowRole.Arn DefinitionUri: statemachine/simple-pass-state.asl.json ################################################################################ # No-op IAM role for simple state machines ################################################################################ NoOpWorkflowRole: Type: AWS::IAM::Role Properties: AssumeRolePolicyDocument: Version: "2012-10-17" Statement: - Effect: Allow Principal: Service: - !Sub states.${AWS::Region}.amazonaws.com Action: sts:AssumeRole