SQS 서비스

Amazon Q Developer를 사용해 DynamoDB 서비스를 위한 코드를 생성합니다.


예시 #1

큐 생성

일반적인 프롬프트

create an sqs client and
create a queue if it does not exist
otherwise return the queue

Python 프롬프트

VSCode에서 파일을 생성하고 이름을 sqs.py로 지정하고 다음 코드를 입력합니다.

"""
create an sqs client and
create a queue if it does not exist
otherwise return the queue

"""
chevron-rightAmazon Q Developer 제안hashtag
import boto3

def create_queue(queue_name):
    sqs = boto3.resource('sqs')
    try:
        queue = sqs.create_queue(QueueName=queue_name)
        return queue
    except Exception as e:
        print(e)
        return None

예시 #2

큐 생성

일반적인 프롬프트

Python 프롬프트

chevron-rightAmazon Q Developer 제안hashtag

예시 #3

Item 추가

일반적인 프롬프트

Python 프롬프트

chevron-rightAmazon Q Developer 제안hashtag

예시 #4

Item 가져오기

일반적인 프롬프트

Python 프롬프트

chevron-rightAmazon Q Developer 제안hashtag

Last updated