boto3.resource vs boto3.client #4414
-
Describe the issuein this example, in later examples, we use Which method is preferred? Linkshttps://boto3.amazonaws.com/v1/documentation/api/latest/guide/sqs.html#creating-a-queue |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @plushcare-chau, thanks for reaching out. I'll be turning this into a discussion, as it is a guidance question. Using the client is recommended. Using resources might work depending on what you're trying to do, but resources have been feature frozen (not deprecated) for some time now, and might be missing recent service features. If what you're trying to do is fully supported by resources, then you can use either. You can check SQS resource operations here. Let me know if you have any follow-up questions. |
Beta Was this translation helpful? Give feedback.
Hi @plushcare-chau, thanks for reaching out. I'll be turning this into a discussion, as it is a guidance question.
Using the client is recommended. Using resources might work depending on what you're trying to do, but resources have been feature frozen (not deprecated) for some time now, and might be missing recent service features. If what you're trying to do is fully supported by resources, then you can use either. You can check SQS resource operations here. Let me know if you have any follow-up questions.