Skip to content

armgit / floci

Public Imported from GitHub
0

Light, fluffy, and always free - The AWS Local Emulator alternative

1.8 KB
Raw Blame
{
  "expected": {
    "FnEventInvokeConfig": {
      "Properties": {
        "DestinationConfig": {
          "OnFailure": {
            "Destination": {
              "Fn::GetAtt": [
                "Dlq",
                "Arn"
              ]
            }
          }
        },
        "FunctionName": {
          "Ref": "Fn"
        },
        "MaximumEventAgeInSeconds": 21600,
        "MaximumRetryAttempts": 2,
        "Qualifier": "$LATEST"
      },
      "Type": "AWS::Lambda::EventInvokeConfig"
    },
    "FnRole": {
      "Policies": [
        {
          "PolicyDocument": {
            "Statement": [
              {
                "Action": "sqs:SendMessage",
                "Effect": "Allow",
                "Resource": {
                  "Fn::GetAtt": [
                    "Dlq",
                    "Arn"
                  ]
                }
              }
            ]
          },
          "PolicyName": "FnEventInvokeConfigOnFailureSQSPolicy"
        }
      ],
      "Type": "AWS::IAM::Role"
    }
  },
  "input": {
    "Resources": {
      "Dlq": {
        "Type": "AWS::SQS::Queue"
      },
      "Fn": {
        "Properties": {
          "CodeUri": "s3://b/k",
          "EventInvokeConfig": {
            "DestinationConfig": {
              "OnFailure": {
                "Destination": {
                  "Fn::GetAtt": [
                    "Dlq",
                    "Arn"
                  ]
                },
                "Type": "SQS"
              }
            },
            "MaximumEventAgeInSeconds": 21600,
            "MaximumRetryAttempts": 2
          },
          "Handler": "index.handler",
          "Runtime": "python3.12"
        },
        "Type": "AWS::Serverless::Function"
      }
    },
    "Transform": "AWS::Serverless-2016-10-31"
  }
}