Created
April 19, 2023 01:47
-
-
Save AngelChaidez/c3f25eda286a0156f6b7abd5e5f7a160 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ env python3.11 | |
# import a function from another module will be used to generate a name at random | |
import boto3 | |
import os | |
import sys | |
from botocore.exceptions import ClientError | |
sys.path.append("sqs") | |
from create_sqs import create_service_name | |
sns_client = boto3.client('sns') | |
sns_name = create_service_name('SNS_SQS_') | |
print(sns_name) | |
try: | |
response = sns_client.create_topic( | |
Name = sns_name) | |
print(f"SNS topic created successfully : {sns_name}") | |
except ClientError as e: | |
print(e.message) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment