Amazon Simple Notification Service setup

By subscribing to Placer’s SNS topic, you will be able to receive live updates on feeds' delivery completion.

There are two available supported options for subscribing to Placer's SNS topic.

Lambda subscription

Follow the following steps to fulfill the subscription to Placer's SNS delivery completion topic:

  1. Create the execution role that gives your function permission to access AWS resources.


👉 How to create an execution role?

  1. Open the roles page in the IAM console.
  2. Choose Create role.
  3. Create a role with the following properties.
    • Trusted entity – AWS Lambda.
    • Permissions – AWSLambdaBasicExecutionRole.
    • Role name – lambda-sns-role.
  1. Create a function that processes events from Amazon SNS. (You can be assisted by code samples here.
    After creating the function, record its function ARN.
  2. Set up cross-account permissions -
    1. Provide Placer with your account ARN, so that Placer can grant subscription permissions.
    2. Add the Lambda permission to allow invocation from Amazon SNS.


⚙️ Coding

aws lambda add-permission --function-name Function-With-SNS
--source-arn arn:aws:sns:us-east-1::sns-topic-for-lambda
--statement-id function-with-sns --action "lambda:InvokeFunction"
--principal --profile

  1. Create a subscription - subscribe to the Lambda function to the topic. When a message is sent to the sns-topic-for-lambda topic in the Placer account, Amazon SNS invokes the function created in your account.


⚙️ Coding

aws sns subscribe --protocol lambda
--region us-east-1
--topic-arn arn:aws:sns:us-east-1::sns-topic-for-lambda
--notification-endpoint arn:aws:lambda:us-east-1::function:Function-With-SNS
--profile <Your_account>

The output contains the ARN of the topic subscription.

You can review the full Amazon article here.

Assuming role

Another option for accessing the Placer SNS topic for delivery completion notifications would be by assuming the Placer AWS role. In order to configure this option the following actions are required:

  1. Provide Placer with the identity that will be assuming the Placer AWS role for granting needed permissions.
  2. Placer will provide you with our AWS role to be assumed.