for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
import json
import boto3
boto3
This can be caused by one of the following:
This error could indicate a configuration issue of Pylint. Make sure that your libraries are available by adding the necessary commands.
# .scrutinizer.yml before_commands: - sudo pip install abc # Python2 - sudo pip3 install abc # Python3
This error could also result from missing __init__.py files in your module folders. Make sure that you place one file in each sub-folder.
__init__.py
def sqs_publish(queue, message):
_client = boto3.client('sqs')
if queue.startswith('https://'):
queue_url = queue
else:
response = _client.get_queue_url(QueueName=queue)
queue_url = response['QueueUrl']
return _client.send_message(QueueUrl=queue_url, MessageBody=message)
def sns_publish(topic, message):
_client = boto3.client('sns')
if topic.startswith('arn:'):
arn = topic
topics = _client.list_topics()
for topic_data in topics['Topics']:
if topic_data['TopicArn'].endswith(topic):
arn = topic_data['TopicArn']
break
msg = json.dumps({'default': message})
return _client.publish(TopicArn=arn, MessageStructure='json', Message=msg)
This can be caused by one of the following:
1. Missing Dependencies
This error could indicate a configuration issue of Pylint. Make sure that your libraries are available by adding the necessary commands.
2. Missing __init__.py files
This error could also result from missing
__init__.py
files in your module folders. Make sure that you place one file in each sub-folder.