sample-with-amq-consumer/sample-with-amq-consumer.yaml [125:170]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      Handler: com.amazonaws.samples.LambdaHandler::handleRequest
      Runtime: java8
      MemorySize: 512
      Timeout: 300
      Tracing: Active
      Policies:
        
        Statement:
          -  Effect: "Allow"
             Action:
                - "cloudwatch:GetDashboard"
                - "cloudwatch:ListDashboards"
                - "cloudwatch:PutDashboard"
                - "cloudwatch:ListMetrics"    
                - "cloudwatch:GetMetricWidgetImage"
             Resource:
               - "*"  
          -  Effect: "Allow"
             Action:
               - "s3:*"
               
             Resource:
               Fn::Join:
                 - ""
                 - - "arn:aws:s3:::"
                   - Ref: MetricWidgetBucket
                   - "/*"

      Environment:
          Variables:
            METRIC_WIDGET_BUCKET: !Ref MetricWidgetBucket
                 
      Events:
        BrokerDashboard:
          Type: Api # More info about API Event Source: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#api
          Properties:
            Path: /get-broker-dashboard
            Method: get

Outputs:
  JMSBridgeECSClusterRef:
    Description: The name of the JMS bridge ECS cluster
    Value: !Ref JMSBridgeECSCluster
  GetPerformanceWidget:
    Description: The name of the API Gateway endpoint to get the cloudwatch widget
    Value: !Sub "https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/get-broker-dashboard?broker={broker}&queue={queue}"  
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



sample-with-amq-producer/sample-with-amq-producer.yaml [124:169]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      Handler: com.amazonaws.samples.LambdaHandler::handleRequest
      Runtime: java8
      MemorySize: 512
      Timeout: 300
      Tracing: Active
      Policies:
        
        Statement:
          -  Effect: "Allow"
             Action:
                - "cloudwatch:GetDashboard"
                - "cloudwatch:ListDashboards"
                - "cloudwatch:PutDashboard"
                - "cloudwatch:ListMetrics"    
                - "cloudwatch:GetMetricWidgetImage"
             Resource:
               - "*"  
          -  Effect: "Allow"
             Action:
               - "s3:*"
               
             Resource:
               Fn::Join:
                 - ""
                 - - "arn:aws:s3:::"
                   - Ref: MetricWidgetBucket
                   - "/*"

      Environment:
          Variables:
            METRIC_WIDGET_BUCKET: !Ref MetricWidgetBucket
                 
      Events:
        BrokerDashboard:
          Type: Api # More info about API Event Source: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#api
          Properties:
            Path: /get-broker-dashboard
            Method: get

Outputs:
  JMSBridgeECSClusterRef:
    Description: The name of the JMS bridge ECS cluster
    Value: !Ref JMSBridgeECSCluster
  GetPerformanceWidget:
    Description: The name of the API Gateway endpoint to get the cloudwatch widget
    Value: !Sub "https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/get-broker-dashboard?broker={broker}&queue={queue}"      
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



