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
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Add Student</title> | |
| </head> | |
| <body> | |
| <h1>Add Student</h1> | |
| <form method="POST"> | |
| <label>Name:</label> |
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
| import boto3 | |
| import json | |
| import time | |
| from sqs_url import QUEUE_URL | |
| # Create SQS client | |
| sqs = boto3.client('sqs') | |
| i = 0 | |
| while i < 10000: | |
| i = i + 1 | |
| rec_res = sqs.receive_message( |
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
| import boto3 | |
| import json | |
| import time | |
| from sqs_url import QUEUE_URL | |
| # Create SQS client | |
| sqs = boto3.client('sqs') | |
| with open('sample_data.json', 'r') as f: | |
| data = json.loads(f.read()) |
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
| import boto3 | |
| import time | |
| from sqs_url import QUEUE_URL | |
| sqs = boto3.client('sqs') | |
| i = 0 | |
| while i < 100000: | |
| i = i + 1 | |
| time.sleep(1) | |
| response = sqs.get_queue_attributes( |
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
| [ | |
| { | |
| "name": "Harper Pierce", | |
| "email": "harperpierce@thepenguinconsultingfirm.com", | |
| "donation": 97.5 | |
| }, | |
| { | |
| "name": "Lois Huber", | |
| "email": "loishuber@thepenguinconsultingfirm.com", | |
| "donation": 28.31 |
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
| QUEUE_URL = "https://queue.amazonaws.com/<Replace with your aws account id>/my-queue" |
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
| import boto3 | |
| # Create SQS client | |
| sqs = boto3.client('sqs') | |
| # Create a SQS queue | |
| response = sqs.create_queue(QueueName='my-queue', | |
| Attributes={'DelaySeconds': '5', | |
| 'VisibilityTimeout': '60', | |
| 'MessageRetentionPeriod': '86400'}) | |
| print(response['QueueUrl']) |