Untitled

mail@pastecode.io avatar
unknown
json
2 years ago
1.9 kB
0
Indexable
Never
    "PolicyForDataIntegrationQueue": {
        "Type": "AWS::SQS::QueuePolicy",
        "Properties": {
          "PolicyDocument": {
            "Version": "2008-10-17",
            "Id": "__default_policy_ID",
            "Statement": [
              {
                "Sid": "__owner_statement",
                "Effect": "Allow",
                "Principal": {
                  "AWS": "arn:aws:iam::${aws:accountId}:root"
                },
                "Action": "SQS:*",
                "Resource": {
                  "Fn::GetAtt": [
                    "DataIntegrationQueue",
                    "Arn"
                  ]
                }
              },
              {
                "Sid": "__sender_statement",
                "Effect": "Allow",
                "Principal": {
                  "Service": "sns.amazonaws.com"
                },
                "Action": "SQS:SendMessage",
                "Resource": {
                  "Fn::GetAtt": [
                    "DataIntegrationQueue",
                    "Arn"
                  ]
                }
              },
              {
                "Sid": "__receiver_statement",
                "Effect": "Allow",
                "Principal": {
                  "AWS": {
                    "Fn::ImportValue": "sca-infra:${self:provider.stage}:BaseLambdaRoleArn"
                  }
                },
                "Action": [
                  "SQS:ChangeMessageVisibility",
                  "SQS:DeleteMessage",
                  "SQS:ReceiveMessage"
                ],
                "Resource": {
                  "Fn::GetAtt": [
                    "DataIntegrationQueue",
                    "Arn"
                  ]
                }
              }
            ]
          },
          "Queues": [
            {
              "Ref": "DataIntegrationQueue"
            }
          ]
        }
      },