Skip to content

AddPermission

Source: src/AWS/SNS/AddPermission.ts

Runtime binding for sns:AddPermission.

Bind this operation to a Topic inside a function runtime to grant other AWS accounts access to topic actions by adding a labeled statement to the topic’s access policy. The binding grants the host function sns:AddPermission on the topic. Provide the AddPermissionHttp layer on the Function to implement the binding.

// init (provide SNS.AddPermissionHttp on the Function)
const addPermission = yield* SNS.AddPermission(topic);
// runtime
yield* addPermission({
Label: "PartnerPublish",
AWSAccountId: ["123456789012"],
ActionName: ["Publish"],
});