Jump to content

AWS experts. How can i access SNS topic created by another team in my serverless file


tamu

Recommended Posts

local/dev environment lo I am creating SNS and its topic

preprod/prod lo already vere team vallu create chesaru

How can my SQS access it in serverless.yml

Link to comment
Share on other sites

your SQS (that you are using inside your lambda) needs to get access to the topic thats in different aws account. I think there has to be a role created specifying your account as a trusted entity and attach a policy with what all actions you may need to perform by providing your QUEUE arn. Or aa topic owner evaroo vallani aa topic policy ni update cheyyamani cheppu 

To enable the subscriber to subscribe to a topic, the topic owner must add the sns:Subscribe and topic ARN to the topic policy via the AWS Management Console, as follows:

{
  "Version":"2012-10-17",
  "Id":"MyTopicSubscribePolicy",
  "Statement":[{
      "Sid":"Allow-other-account-to-subscribe-to-topic",
      "Effect":"Allow",
      "Principal":{
        "AWS":"Queue_Owner"
      },
      "Action":"sns:Subscribe",
      "Resource":"arn:aws:sns:us-east-1:Topic_Owner:MainTopic"
    }
  ]
}
Link to comment
Share on other sites

6 minutes ago, kathanayaka said:

policy lo SQS,SNS access unte you can access the queue using the ARN Name kada?

aa Topic undi Vere account lo antunnadu kada .. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...