Search
 
SCRIPT & CODE EXAMPLE
 

SQL

cloudformation deploy sqs example

---
AWSTemplateFormatVersion: '2010-09-09'
Description: This stack creates a FIFO Queue
Parameters:
  ContentBasedDeduplication:
    Description: Specifie whether to enable content-based deduplication
    Type: String
    AllowedValues:
    - 'true'
    - 'false'
    Default: 'true'
  QueueName:
    Description: This stack will append .fifo to the end of the Queue name.
    Type: String
  DelaySeconds:
    Description: "The time in seconds that the delivery of all messages in the queue"
    Type: Number
    Default: '5'
  MaximumMessageSize:
    Type: Number
    Description: "The limit of how many bytes that a message can contain before Amazon"
    Default: '262144'
  MessageRetentionPeriod:
    Description: "The number of seconds that Amazon SQS retains a message."
    Type: Number
    Default: '345600'
  ReceiveMessageWaitTimeSeconds:
    Description: "Specifies the duration, in seconds, that the ReceiveMessage action
      call waits until a message is in the queue in order to include it in the response"
    Type: Number
    Default: '0'
  UsedeadletterQueue:
    Description: "A dead-letter queue is a queue that other (source) queues can target
      for messages that can't be processed (consumed) successfully."
    Type: String
    AllowedValues:
    - 'true'
    - 'false'
    Default: 'false'
  VisibilityTimeout:
    Description: "This should be longer than the time it would take to process and
      delete a message"
    Type: Number
    Default: '5'
Mappings: {}
Conditions:
  CreateDeadLetterQueue:
    Fn::Equals:
    - Ref: UsedeadletterQueue
    - 'true'
Resources:
  SQSQueue:
    Type: AWS::SQS::Queue
    Properties:
      ContentBasedDeduplication:
        Ref: ContentBasedDeduplication
      FifoQueue: 'true'
      QueueName:
        Fn::Join:
        - ''
        - - Ref: QueueName
          - ".fifo"
      MaximumMessageSize:
        Ref: MaximumMessageSize
      MessageRetentionPeriod:
        Ref: MessageRetentionPeriod
      ReceiveMessageWaitTimeSeconds:
        Ref: ReceiveMessageWaitTimeSeconds
      RedrivePolicy:
        Fn::If:
        - CreateDeadLetterQueue
        - deadLetterTargetArn:
            Fn::GetAtt:
            - MyDeadLetterQueue
            - Arn
          maxReceiveCount: 5
        - Ref: AWS::NoValue
      VisibilityTimeout:
        Ref: VisibilityTimeout
  MyDeadLetterQueue:
    Condition: CreateDeadLetterQueue
    Type: AWS::SQS::Queue
    Properties:
      FifoQueue: 'true'
      QueueName:
        Fn::Join:
        - ''
        - - Ref: QueueName
          - Deadletter
          - ".fifo"
Outputs:
  QueueURL:
    Description: URL of the created SQS
    Value:
      Ref: SQSQueue
  QueueARN:
    Description: ARN of the created SQS
    Value:
      Fn::GetAtt:
      - SQSQueue
      - Arn
  QueueName:
    Description: Name of the created SQS
    Value:
      Fn::GetAtt:
      - SQSQueue
      - QueueName
Comment

PREVIOUS NEXT
Code Example
Sql :: alling a function from PL/SQL in a select statement in ORACLE 
Sql :: oracle c# multiple update sql 
Sql :: convert sql query to linq online 
Sql :: goto in SQL server in production 
Sql :: add id column to temp table insert 
Sql :: sql how to get courses that i have made prerequisites 
Sql :: row_number equivalent MS Access for sequential id By Group (3) 
Sql :: mysqlcli how to load external sql file 
Sql :: syntac for creating view in dbbrowser 
Sql :: oracle date summer time 
Sql :: database db connection string format 
Sql :: Raw query must include the primary key 
Sql :: sqlite3 create table from another table 
Sql :: how set default setting of toolbar in sql developer 
Sql :: distinct data types in a table sql query 
Sql :: openquery update linked server 
Sql :: check constraint is violated 
Sql :: create table with error 
Sql :: SQL DATEADD(date_part, number, date) 
Sql :: call function sql oracle with output put line 
Sql :: SQL Query Orderby Two or More Columns and by number of characters 
Sql :: mysql sum per week 
Sql :: avoid duplicate in one to many relationship join in sql 
Sql :: print $dbpass 
Sql :: sql saut de ligne 
Sql :: create sql database 
Sql :: union statement mysql 
Sql :: how to compile a function in oracle 
Sql :: insert thai language sql server 
Sql :: sql server union if table exist 
ADD CONTENT
Topic
Content
Source link
Name
5+1 =