我首先创建一个队列:
const notificationQueue: sqs.IQueue = new sqs.Queue(this, `${domain}-notificationsQueue`, {
queueName: `${domain}-notificationsQueue.fifo`,
fifo: true,
contentBasedDeduplication: false
});
Run Code Online (Sandbox Code Playgroud)
现在我需要将此队列订阅到 SNS 主题(类似这样,但我需要传入一个 Igrantable 对象 - 我不知道该怎么做)
queue.grantConsumeMessages(grantee: iam.IGrantable)
Run Code Online (Sandbox Code Playgroud)
那么如何创建引用特定 SNS 主题的 Igrantable 对象呢?
我被困在这上面,我不知道该怎么做.
# returns a string that changes all occurrences of its first char have been changed to '*'
def fix_start(str):
results = []
str.startswith(str[1])
results =
Run Code Online (Sandbox Code Playgroud)
例如:给定string ='bubble'它应该返回:bu**le
amazon-iam ×1
amazon-sns ×1
amazon-sqs ×1
aws-cdk ×1
methods ×1
python ×1
replace ×1
string ×1
typescript ×1