I have AWS Inspector setup to message an SNS topic when a scan has completed. I also have a Lambda configured to trigger when a message is seen on that SNS topic. The Lambda just reads in the message, calls out to the Inspector API to generate a URL of the scan report and then ..
Category : amazon-sns
I am trying to read the message from the SNS topic from the python application. Is there a way that we can consume the message from SNS directly? Note: I am aware of the way SNS to SQS and consume the message from there. I want to consume the same message from the N number ..
I’m trying to publish messages to SNS with my python lambda function in AWS, my code is: import boto3 sns = boto3.client(‘sns’) … sns.publish( TopicArn=metadata_item.get(‘snsArn’), Message=json.dumps({‘default’: json.dumps(metadata_item)}), MessageStructure=’json’ ) Looks like all right, but i still getting this error: { "errorMessage": "An error occurred (InvalidParameter) when calling the Publish operation: Invalid parameter: Topic Name", "errorType": ..
I would like to send a dataframe results as body in email using Aws glue (pyspark code) and SNS. Can you please share any sample code or any suggestions to achieve this? Thanks, Jo Source: Python..
Hi Guys I have a use case: I am a broker and post a load. When I post a load all the carriers in my fav list should receive an SMS stating "NEw Load". I was checking through the Docs available, but couldn’t find anything solid. Steps: Create a topic. Add a subscription of the ..
Hi i need to list a specific environment SNS topic using BOTO3, im using this script but it not working. import boto3 import re client = boto3.client(‘sns’, region_name=’ap-southeast-1′) response = client.list_topics() #print(response) #list_topics=[] for each_reg in response[‘Topics’]: print(each_reg[‘TopicArn’]) #x= each_reg[‘TopicArn’].search(‘_dev’) if x: list_topic.append(each_reg[‘TopicArn’]) print (list_topic) #topics=response[‘Topics’] #x = re.findall("_dev", topics) #print(topics) #for response in topics[‘TopicArn’]: ..
Im trying to list the sns topic using boto3 im using this code import boto3 import pprint response = client.list_topics( NextToken=’string’ ) list_topics=[] for each_reg in response[‘topic’]: print(each_reg[‘topic]) but im geting this error File "kri.py", line 14 print(each_reg[‘topic]) ^ SyntaxError: EOL while scanning string literal Source: Python..
I wrote this code from the python cdk library documentation: https://docs.aws.amazon.com/cdk/api/latest/python/modules.html topic = sns.Topic(self , id = env + "-my-EventTopic" , display_name = ‘my name’ , topic_name = env + "-my-EventTopic" ) q1_filter = sns.SubscriptionFilter( conditions = [sns.SubscriptionFilter.string_filter(whitelist=[‘{"action":["Q1_BACKUP"]}’])] ) q2_filter = sns.SubscriptionFilter( conditions=[sns.SubscriptionFilter.string_filter(whitelist=[‘{"action":["Q2_BACKUP"]}’])] ) topic.add_subscription(sns_subs.SqsSubscription( queue = queue2 , filter_policy={‘action’:q1_filter} )) topic.add_subscription(sns_subs.SqsSubscription( queue = queue1 ..

I’m trying to create an alarm using boto3 with python. For this alarm, i wanted to create SNS Topic for sending email to user whenever an alarm is triggered. But using publish i can send instantly but i want to send email when an alarm is triggered/raised. Can someone guide me how to send email ..
I have gone through stack-overflow link which uses codebuild and codepipeline. Is there a way to send cloudwatch logs of a scheduled lambda function as an email using sns. Thanks! Source: Python..
Recent Comments