{"id":50331748,"url":"https://github.com/aws/amazon-s3-encryption-client-python","last_synced_at":"2026-05-29T10:01:03.746Z","repository":{"id":361043526,"uuid":"1028650315","full_name":"aws/amazon-s3-encryption-client-python","owner":"aws","description":"Client-side encryption for S3 using the boto3 SDK","archived":false,"fork":false,"pushed_at":"2026-05-29T00:03:22.000Z","size":1409,"stargazers_count":0,"open_issues_count":15,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-29T02:12:27.143Z","etag":null,"topics":["aws","aws-s3","boto3","client-side-encryption","cryptography","s3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aws.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"SUPPORT_POLICY.rst","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-29T21:13:36.000Z","updated_at":"2026-05-26T19:19:05.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/aws/amazon-s3-encryption-client-python","commit_stats":null,"previous_names":["aws/amazon-s3-encryption-client-python"],"tags_count":1,"template":false,"template_full_name":"amazon-archives/__template_Apache-2.0","purl":"pkg:github/aws/amazon-s3-encryption-client-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Famazon-s3-encryption-client-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Famazon-s3-encryption-client-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Famazon-s3-encryption-client-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Famazon-s3-encryption-client-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aws","download_url":"https://codeload.github.com/aws/amazon-s3-encryption-client-python/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Famazon-s3-encryption-client-python/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33646428,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","aws-s3","boto3","client-side-encryption","cryptography","s3"],"created_at":"2026-05-29T10:01:02.858Z","updated_at":"2026-05-29T10:01:03.741Z","avatar_url":"https://github.com/aws.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Amazon S3 Encryption Client for Python\n\nThis library provides an S3 client that supports client-side encryption. For more information and detailed instructions for how to use this library, refer to the [Amazon S3 Encryption Client Developer Guide](https://docs.aws.amazon.com/amazon-s3-encryption-client/latest/developerguide/python.html).\n\n## Getting Started\n\nRequires Python 3.10 or greater. An AWS account is required; standard S3 and KMS charges apply.\n\nThe S3 Encryption Client wraps a standard boto3 S3 client and uses a KMS keyring to manage data key encryption. Objects are encrypted before upload and decrypted after download transparently. By default, the client uses AES-GCM with key commitment for content encryption.\n\n```python\nimport boto3\nfrom s3_encryption import S3EncryptionClient, S3EncryptionClientConfig\nfrom s3_encryption.materials.kms_keyring import KmsKeyring\n\nkms_client = boto3.client(\"kms\", region_name=\"us-west-2\")\nkeyring = KmsKeyring(kms_client, \"arn:aws:kms:us-west-2:123456789012:alias/my-key\")\n\ns3_client = boto3.client(\"s3\")\nconfig = S3EncryptionClientConfig(keyring=keyring)\ns3ec = S3EncryptionClient(s3_client, config)\n\n# Encrypt and upload\ns3ec.put_object(Bucket=\"my-bucket\", Key=\"my-object\", Body=b\"secret data\")\n\n# Download and decrypt\nresponse = s3ec.get_object(Bucket=\"my-bucket\", Key=\"my-object\")\nplaintext = response[\"Body\"].read()\n```\n\n## Development\n\n### Prerequisites\n\n- Python 3.10 or higher\n- [uv](https://github.com/astral-sh/uv) for package and project management\n\n### Setup\n\nInstall dependencies:\n\n```bash\nmake install\n```\n\n### Testing\n\nRun all tests (unit + integration + examples):\n\n```bash\nmake test\n```\n\nRun unit tests only:\n\n```bash\nmake test-unit\n```\n\nRun integration tests only:\n\n```bash\nmake test-integration\n```\n\n### Code Quality\n\nThis project uses [Ruff](https://docs.astral.sh/ruff/) for linting and formatting.\n\nCheck formatting:\n\n```bash\nmake format-check\n```\n\nRun linter:\n\n```bash\nmake lint\n```\n\nFormat code and auto-fix lint issues:\n\n```bash\nmake format\n```\n\n### Integration Test Resources\n\nIntegration tests require AWS credentials and the following resources. The tests use environment variables to override CI defaults:\n\n| Variable | Description | Default |\n|----------|-------------|---------|\n| `CI_S3_BUCKET` | S3 bucket for read/write tests | `s3ec-python-github-test-bucket` |\n| `CI_AWS_REGION` | Primary AWS region | `us-west-2` |\n| `CI_KMS_KEY_ALIAS` | KMS key ARN or alias for encryption | `arn:aws:kms:us-west-2:370957321024:alias/S3EC-Python-Github-KMS-Key` |\n| `CI_MRK_KEY_ID_PRIMARY` | Multi-region key ARN (primary region) | `arn:aws:kms:us-west-2:370957321024:key/mrk-cea4cf67c6a046ba829f61f69db5c191` |\n| `CI_MRK_KEY_ID_REPLICA` | Multi-region key ARN (replica region) | `arn:aws:kms:us-east-1:370957321024:key/mrk-cea4cf67c6a046ba829f61f69db5c191` |\n| `CI_S3_STATIC_TEST_BUCKET` | Bucket with pre-existing test objects for instruction file tests | `s3ec-static-test-objects` |\n| `CI_KMS_KEY_STATIC_TESTS` | KMS key used for static test objects | `arn:aws:kms:us-west-2:370957321024:key/a3889cd9-99eb-4138-a93a-aea9d52ec2ef` |\n\nTo run integration tests locally, configure AWS credentials with access to these resources (or your own equivalents) and set the environment variables accordingly.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faws%2Famazon-s3-encryption-client-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faws%2Famazon-s3-encryption-client-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faws%2Famazon-s3-encryption-client-python/lists"}