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.
Follow the following steps to fulfill the subscription to Placer's SNS delivery completion topic:
- Create the execution role that gives your function permission to access AWS resources.
👉 How to create an execution role?
- Open the roles page in the IAM console.
- Choose Create role.
- Create a role with the following properties.
- Trusted entity – AWS Lambda.
- Permissions – AWSLambdaBasicExecutionRole.
- Role name – lambda-sns-role.
- 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.
- Set up cross-account permissions -
- Provide Placer with your account ARN, so that Placer can grant subscription permissions.
- Add the Lambda permission to allow invocation from Amazon SNS.
aws lambda add-permission --function-name Function-With-SNS
--statement-id function-with-sns --action "lambda:InvokeFunction"
--principal sns.amazonaws.com --profile
- 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.
aws sns subscribe --protocol lambda
The output contains the ARN of the topic subscription.
You can review the full Amazon article here.
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:
- Provide Placer with the identity that will be assuming the Placer AWS role for granting needed permissions.
- Placer will provide you with our AWS role to be assumed.
Updated 3 months ago