boto3_sqs¶
Manage SQS Queues using boto3.¶
Renamed from
boto_sqstoboto3_sqsand updated to call the refactoredboto3_sqsexecution module.
Create and destroy SQS queues. Be aware that this interacts with Amazon’s services, and so may incur charges.
- depends:
boto3 >= 1.28.0
botocore >= 1.31.0
This module uses boto3, which can be installed via package, or pip.
This module accepts explicit SQS credentials but can also utilize IAM roles assigned to the instance through Instance Profiles. Dynamic credentials are then automatically obtained from AWS API and no further configuration is necessary. More information available here.
If IAM roles are not used you need to specify them either in a pillar file or in the minion’s config file:
sqs.keyid: GKTADJGHEIQSXMKKRBJ08H
sqs.key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
It’s also possible to specify key, keyid and region via a profile, either
passed in as a dict, or as a string to pull from pillars or minion config:
myprofile:
keyid: GKTADJGHEIQSXMKKRBJ08H
key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
region: us-east-1
myqueue:
boto3_sqs.present:
- region: us-east-1
- keyid: GKTADJGHEIQSXMKKRBJ08H
- key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
- attributes:
ReceiveMessageWaitTimeSeconds: 20
# Using a profile from pillars
myqueue:
boto3_sqs.present:
- region: us-east-1
- profile: mysqsprofile
# Passing in a profile
myqueue:
boto3_sqs.present:
- region: us-east-1
- profile:
keyid: GKTADJGHEIQSXMKKRBJ08H
key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs
Added in version 1.0.0.
- saltext.boto3.states.boto3_sqs.present(name, attributes=None, region=None, key=None, keyid=None, profile=None)[source]¶
Ensure the SQS queue exists.
- name
Name of the SQS queue.
- attributes
A dict of key/value SQS attributes.
- region
Region to connect to.
- key
Secret key to be used.
- keyid
Access key to be used.
- profile
A dict with region, key and keyid, or a pillar key (string) that contains a dict with region, key and keyid.
Example:
ensure-present: boto3_sqs.present: - name: example
- saltext.boto3.states.boto3_sqs.absent(name, region=None, key=None, keyid=None, profile=None)[source]¶
Ensure the named sqs queue is deleted.
- name
Name of the SQS queue.
- region
Region to connect to.
- key
Secret key to be used.
- keyid
Access key to be used.
- profile
A dict with region, key and keyid, or a pillar key (string) that contains a dict with region, key and keyid.
Example:
ensure-absent: boto3_sqs.absent: - name: example