@@ -2648,113 +2648,6 @@ Resources:
26482648 Principal : !Sub "events.${AWS::URLSuffix}"
26492649 SourceArn : !GetAtt WorkflowStateChangeRule.Arn
26502650
2651- # #########################################################################
2652- # Step Functions Subscription Publisher
2653- # #########################################################################
2654- StepFunctionSubscriptionPublisher :
2655- Type : AWS::Serverless::Function
2656- Metadata :
2657- cfn_nag :
2658- rules_to_suppress :
2659- - id : W89
2660- reason : " Function does not require VPC access as it only interacts with AWS services via APIs"
2661- - id : W92
2662- reason : " Function does not require reserved concurrency as it scales based on demand"
2663- - id : W12
2664- reason : " Lambda requires CloudWatch logs permissions"
2665- # checkov:skip=CKV_AWS_116: "DLQ not required for subscription publisher function"
2666- # checkov:skip=CKV_AWS_117: "Function does not require VPC access as it only interacts with AWS services via APIs"
2667- # checkov:skip=CKV_AWS_115: "Function does not require reserved concurrency as it scales based on demand"
2668- # checkov:skip=CKV_AWS_173: "Environment variables do not contain sensitive data - only configuration values like feature flags and non-sensitive settings"
2669- Properties :
2670- PermissionsBoundary : !If [HasPermissionsBoundary, !Ref PermissionsBoundaryArn, !Ref AWS::NoValue]
2671- CodeUri : src/lambda/stepfunction_subscription_publisher/
2672- Handler : index.handler
2673- Runtime : python3.12
2674- Architectures :
2675- - x86_64
2676- MemorySize : 256
2677- Timeout : 30
2678- LoggingConfig :
2679- LogGroup : !Ref StepFunctionSubscriptionPublisherLogGroup
2680- Environment :
2681- Variables :
2682- APPSYNC_API_URL : !GetAtt GraphQLApi.GraphQLUrl
2683- LOG_LEVEL : !Ref LogLevel
2684- Policies :
2685- - Statement :
2686- - Effect : Allow
2687- Action :
2688- - states:DescribeExecution
2689- - states:GetExecutionHistory
2690- Resource :
2691- - !Sub
2692- - " arn:${AWS::Partition}:states:${AWS::Region}:${AWS::AccountId}:execution:${StateMachineName}*"
2693- - StateMachineName : !If
2694- - IsPattern3
2695- - !GetAtt PATTERN3STACK.Outputs.StateMachineName
2696- - !If
2697- - IsPattern2
2698- - !GetAtt PATTERN2STACK.Outputs.StateMachineName
2699- - !GetAtt PATTERN1STACK.Outputs.StateMachineName
2700- - Effect : Allow
2701- Action :
2702- - appsync:GraphQL
2703- Resource :
2704- - !Sub " ${GraphQLApi.Arn}/types/Subscription/*"
2705- - !Sub " ${GraphQLApi.Arn}/types/Mutation/*"
2706- - Effect : Allow
2707- Action :
2708- - kms:Encrypt
2709- - kms:Decrypt
2710- - kms:ReEncrypt*
2711- - kms:GenerateDataKey*
2712- - kms:DescribeKey
2713- Resource : !GetAtt CustomerManagedEncryptionKey.Arn
2714-
2715- StepFunctionSubscriptionPublisherLogGroup :
2716- Type : AWS::Logs::LogGroup
2717- Properties :
2718- KmsKeyId : !GetAtt CustomerManagedEncryptionKey.Arn
2719- RetentionInDays : !Ref LogRetentionDays
2720-
2721- StepFunctionSubscriptionRule :
2722- Type : AWS::Events::Rule
2723- Properties :
2724- EventPattern :
2725- source :
2726- - aws.states
2727- detail-type :
2728- - Step Functions Execution Status Change
2729- detail :
2730- stateMachineArn :
2731- - !If
2732- - IsPattern3
2733- - !GetAtt PATTERN3STACK.Outputs.StateMachineArn
2734- - !If
2735- - IsPattern2
2736- - !GetAtt PATTERN2STACK.Outputs.StateMachineArn
2737- - !GetAtt PATTERN1STACK.Outputs.StateMachineArn
2738- status :
2739- - RUNNING
2740- - SUCCEEDED
2741- - FAILED
2742- - TIMED_OUT
2743- - ABORTED
2744- Targets :
2745- - Arn : !GetAtt StepFunctionSubscriptionPublisher.Arn
2746- Id : " StepFunctionSubscriptionPublisher"
2747- RetryPolicy :
2748- MaximumRetryAttempts : 3
2749-
2750- StepFunctionSubscriptionPublisherPermission :
2751- Type : AWS::Lambda::Permission
2752- Properties :
2753- Action : lambda:InvokeFunction
2754- FunctionName : !Ref StepFunctionSubscriptionPublisher
2755- Principal : !Sub "events.${AWS::URLSuffix}"
2756- SourceArn : !GetAtt StepFunctionSubscriptionRule.Arn
2757-
27582651 # #########################################################################
27592652 # Optional Post Processing Lambda Hook
27602653 # #########################################################################
@@ -5406,71 +5299,6 @@ Resources:
54065299 TypeName : Query
54075300 FieldName : getStepFunctionExecution
54085301
5409- PublishStepFunctionUpdateResolverFunction :
5410- Type : AWS::Serverless::Function
5411- Metadata :
5412- cfn_nag :
5413- rules_to_suppress :
5414- - id : W89
5415- reason : " Function does not require VPC access as it only interacts with AWS services via APIs"
5416- - id : W92
5417- reason : " Function does not require reserved concurrency as it scales based on demand"
5418- - id : W12
5419- reason : " Lambda requires CloudWatch logs permissions"
5420- # checkov:skip=CKV_AWS_116: "DLQ not required for AppSync resolver function"
5421- # checkov:skip=CKV_AWS_117: "Function does not require VPC access as it only interacts with AWS services via APIs"
5422- # checkov:skip=CKV_AWS_115: "Function does not require reserved concurrency as it scales based on demand"
5423- # checkov:skip=CKV_AWS_173: "Environment variables do not contain sensitive data - only configuration values like feature flags and non-sensitive settings"
5424- Properties :
5425- PermissionsBoundary : !If [HasPermissionsBoundary, !Ref PermissionsBoundaryArn, !Ref AWS::NoValue]
5426- CodeUri : src/lambda/publish_stepfunction_update_resolver/
5427- Handler : index.lambda_handler
5428- Runtime : python3.12
5429- Architectures :
5430- - x86_64
5431- MemorySize : 256
5432- Timeout : 30
5433- LoggingConfig :
5434- LogGroup : !Ref PublishStepFunctionUpdateResolverFunctionLogGroup
5435- Environment :
5436- Variables :
5437- LOG_LEVEL : !Ref LogLevel
5438- Policies :
5439- - Statement :
5440- - Effect : Allow
5441- Action :
5442- - kms:Encrypt
5443- - kms:Decrypt
5444- - kms:ReEncrypt*
5445- - kms:GenerateDataKey*
5446- - kms:DescribeKey
5447- Resource : !GetAtt CustomerManagedEncryptionKey.Arn
5448-
5449- PublishStepFunctionUpdateResolverFunctionLogGroup :
5450- Type : AWS::Logs::LogGroup
5451- Properties :
5452- KmsKeyId : !GetAtt CustomerManagedEncryptionKey.Arn
5453- RetentionInDays : !Ref LogRetentionDays
5454-
5455- PublishStepFunctionUpdateDataSource :
5456- Type : AWS::AppSync::DataSource
5457- Properties :
5458- ApiId : !GetAtt GraphQLApi.ApiId
5459- Name : PublishStepFunctionUpdate
5460- Description : Lambda function to publish Step Functions execution updates via GraphQL API
5461- Type : AWS_LAMBDA
5462- ServiceRoleArn : !GetAtt AppSyncServiceRole.Arn
5463- LambdaConfig :
5464- LambdaFunctionArn : !GetAtt PublishStepFunctionUpdateResolverFunction.Arn
5465-
5466- PublishStepFunctionUpdateResolver :
5467- Type : AWS::AppSync::Resolver
5468- DependsOn : GraphQLSchema
5469- Properties :
5470- ApiId : !GetAtt GraphQLApi.ApiId
5471- DataSourceName : !GetAtt PublishStepFunctionUpdateDataSource.Name
5472- TypeName : Mutation
5473- FieldName : publishStepFunctionExecutionUpdate
54745302
54755303 ConfigurationResolverFunction :
54765304 Type : AWS::Serverless::Function
0 commit comments