Closed uskudnik closed 11 years ago
Can you explain how this feature is used? What must one do to pre-configure SNS?
You should give your AWS account that is accessing glacier permissions for creating topics and subscribing and I think that should be it for non-tool related things. Then add [SNS]
to your configuration file and or run glacier sns enable
and it should work.
Usage and CLI API changed a bit; full description and code
Hey guys,
I need a bit of feedback on SNS support/API.
Current implementation: https://github.com/uskudnik/amazon-glacier-cmd-interface/commit/8b922f27f380c69ea6d9cd74c81589d3670ba37c
From usage standpoint:
Enable
glaciercmd sns enable
(maybe rename to init): addsto your configuration file. By default all vaults are subscribed to this one topic if you run sync command. However, you can also add
vaults
and specify for which vaults you would like notifications.We also have sections, which make config file look like this:
Sync
glaciercmd sns sync
Goes through file - if sections are present it subscribes all the specified vaults to appropriate topics ("topic-topicname1").
Subscribe
I have subscribe mostly programmed for old version (where there was per-vault notifications - not very practical since by default you can only have 100 topics), so it should be in a few days that we also have:
glaciedcmd sns subscribe protocol endpoint [topicname1 [topicname2, ...]]
where protocol is either http, https, email or sms and endpoint appropriate target (email/http address, phone number).
Looks good? Feedback?