# 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: > isolator Sample SAM Template for isolator # More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst Globals: Function: Timeout: 5 Resources: IsolatorStateMachine: Type: AWS::Serverless::StateMachine Properties: Name: Isolator Policies: - LambdaInvokePolicy: FunctionName: !Ref IsolatorFunction - LambdaInvokePolicy: FunctionName: !Ref SnapshotFunction DefinitionUri: statemachine/workflows-dev-test.asl.json DefinitionSubstitutions: IsolatorFunctionArn: !GetAtt IsolatorFunction.Arn SnapshotFunctionArn: !GetAtt SnapshotFunction.Arn IsolatorFunction: Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction Properties: CodeUri: functions/isolator/ Handler: isolator Runtime: go1.x Tracing: Active # https://docs.aws.amazon.com/lambda/latest/dg/lambda-x-ray.html SnapshotFunction: Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction Properties: CodeUri: functions/snapshot/ Handler: snapshot Runtime: go1.x Tracing: Active # https://docs.aws.amazon.com/lambda/latest/dg/lambda-x-ray.html Outputs: IsolatorFunction: Description: "Lambda function to isolate security groups" Value: !GetAtt IsolatorFunction.Arn SnapshotFunction: Description: "Lambda function to initiate EBS volume snapshot" Value: !GetAtt SnapshotFunction.Arn IsolatorWorkflow: Description: "Workflow ARN" Value: !Ref IsolatorStateMachine