Skip to content

Instantly share code, notes, and snippets.

@MuhammadQuran17
Last active October 6, 2025 11:48
Show Gist options
  • Select an option

  • Save MuhammadQuran17/b93c8f90ea03cc499a162cd26d0fdfc0 to your computer and use it in GitHub Desktop.

Select an option

Save MuhammadQuran17/b93c8f90ea03cc499a162cd26d0fdfc0 to your computer and use it in GitHub Desktop.
AWS, Azure For AI infrastructure.

Pricing is the same as in AI providers API's\

Privacy

  1. OpenAI - Privacy . OpenAI temporarily stores your data for two main reasons, but it does not use your API data to train its models unless you explicitly agree to it.
    For Safety (Abuse Monitoring): OpenAI keeps a log of your requests (prompts and responses) for up to 30 days. This is like a temporary security camera recording. They use it to check if anyone is using the platform for harmful purposes, like creating illegal or dangerous content. This is the default setting for everyone.
    To Make Features Work (Application State): Some tools, like the Assistants API, need to remember your conversation history or the files you've uploaded to function correctly. If you create an Assistant, it will store that data until you decide to delete it. For most simple requests, like generating text with the Chat Completions endpoint, no data is stored for this purpose.
    Zero Data Retention (ZDR): Eligible customers can apply for this option. If approved, OpenAI will not store your prompts and responses in its abuse monitoring logs at all. It also forces some features to not save any "application state," essentially making them forget everything immediately after the request is done.
    Manual Deletion: For features that store data to function (like Assistants, Threads, or Files), you are in control. The data stays there until you actively delete it through the API or the dashboard.

Choosing Where Your Data Lives (Data Residency)

If your business needs data to stay in a specific geographic area (like Europe or the US), OpenAI offers data residency controls.

This means you can configure your project so that your actual content (prompts, files, responses) is stored and processed in a region you choose. However, this doesn't apply to general account information like your name or billing details. To use this feature in regions outside the US, you typically need to be approved for Zero Data Retention first.

  1. AWS - GDPR compilance and other regulations
  2. Azure - How to Configure for GDPR compilence

https://github.com/codelion/optillm - to anonimize and deanonimize prompts on way

Ai's agent Memory

Feature Aspect Azure OpenAI API AWS Bedrock
Built-in persistent chat history No, session memory only, lost on refresh Yes, supports memory with configurable retention
Thread abstraction Yes, threads API helps manage conversation history tokens Yes, sessions with memory management and summarization
Responsibility for history saving On developer/app (store thread IDs, messages) Partially managed by Bedrock with memory enabled
Long-term memory capability No, manual management required Yes, up to 365 days retention configurable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment