Stack to create a SNS in AWS

Stack to create a SNS in AWS

Cloudformation:

      

      Description: Create an SNS
      Parameters:
        Stage:
          Description: Environment Name
          Type: String
        CrossAccountExternalAccountId:
          Type: String
          Description: Account Id
        StandardTopicName:
          Type: String
          Description: Queue Name

      Resources:
        SnsTopicRef:
          Type: AWS::SNS::Topic
          Properties:
            TopicName: !Join [ "-", [!Ref StandardTopicName] ]
            DisplayName: !Join [ "-", [!Ref StandardTopicName] ]
            Tags:
              - 
                Key: "environment"
                Value: !Ref Stage
        SnsTopicRefPolicy:
          Type: AWS::SNS::TopicPolicy
          Properties:
            PolicyDocument:
              Version: "2012-10-17"
              Statement:
                - Sid: "allow-cross-account-lambda"
                  Effect: Allow
                  Principal:
                    AWS:
                      - !Ref CrossAccountExternalAccountId
                  Resource: !Ref SnsTopicRef
                  Action: 
                      - "sns:Publish"   
            Topics:
              - Ref: SnsTopicRef

      Outputs:
        SnsTopicRef:
          Value: !Ref SnsTopicRef
          Description: Create an SNS

      
  

Comentarios

Entradas más populares de este blog

Ejemplo Log4j 2 en JAVA | Log4j 2 en Springboot | Configuración Log4j 2 | Log4j 2 in SpringBoot| Example Log4j 2 in SpringBoot | Configuring Log4j 2

Python: Inyección de dependencias

GOlang con Docker | GOlang with Docker | GO con Docker | GO with Docker