Skip to content

Conversation

@swi-michalkrupa
Copy link
Contributor

SQS3script.py updated

A purpose of this update is that when the script does not find the S3 bucket, it might be caused by the fact the SQS queue and the S3 bucket are in different regions, which is not supported by AWS. This is displayed to the user who runs the script, when the bucket is not found.

Next step is to update documentation.

@swi-michalkrupa swi-michalkrupa changed the title Updated message when the S3 bucket is not found. LOG-7362 Updated message when the S3 bucket is not found. Oct 9, 2020
if bucket.creation_date is None:
print('S3 bucket {} does not exist, please create it and run the script again'.format(bucket_name))
region = boto3.session.Session().region_name
print('\033[91m', 'S3 bucket {} does not exist, please create it and run the script again. Also, make sure the S3 bucket and the SQS queue are in the same region. Current session region: {}'.format(bucket_name, region))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you create a custom print function which adds the color code and swap all prints for that one?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better?

@swi-michalkrupa swi-michalkrupa merged commit 5210433 into master Oct 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants