Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
LOG-7362 Updated message when the S3 bucket is not found. #138
Conversation
AWSscripts/SQS3script.py
Outdated
| @@ -287,7 +287,8 @@ def get_args(): | |||
| def get_bucket(session, bucket_name): | |||
| bucket = session.resource('s3').Bucket(bucket_name) | |||
| 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)) | |||
MichalChomo
Oct 9, 2020
Contributor
Could you create a custom print function which adds the color code and swap all prints for that one?
Could you create a custom print function which adds the color code and swap all prints for that one?
swi-michalkrupa
Oct 9, 2020
Author
Contributor
Better?
Better?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
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.