From da4c7cd87c6fe3d470015815ae2988813f03274c Mon Sep 17 00:00:00 2001 From: annaCPR Date: Mon, 18 Nov 2024 10:57:49 +0000 Subject: [PATCH] Feature/pdct 1671 s3 back up for bulk import (#247) * Comment s3 backup logic back in + test refactor * Bump patch version * Bump patch version again * Move validation functions to the validation service * Use a simple aws client without config to connect to s3 * Bump patch version --- app/clients/aws/s3bucket.py | 5 +++-- pyproject.toml | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/clients/aws/s3bucket.py b/app/clients/aws/s3bucket.py index 1a111c02..8de3e5bf 100644 --- a/app/clients/aws/s3bucket.py +++ b/app/clients/aws/s3bucket.py @@ -6,10 +6,11 @@ from typing import Any from urllib.parse import quote_plus, urlsplit +import boto3 from botocore.exceptions import ClientError from pydantic import BaseModel -from app.clients.aws.client import AWSClient, get_s3_client +from app.clients.aws.client import AWSClient from app.errors import RepositoryError _LOGGER = logging.getLogger(__name__) @@ -125,7 +126,7 @@ def upload_ingest_json_to_s3( json.dump(data, file, indent=4) return - s3_client = get_s3_client() + s3_client = boto3.client("s3", region_name="eu-west-2") context = S3UploadContext( bucket_name=ingest_upload_bucket, diff --git a/pyproject.toml b/pyproject.toml index 0ea054ee..3578846d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "admin_backend" -version = "2.17.10" +version = "2.17.11" description = "" authors = ["CPR-dev-team "] packages = [{ include = "app" }, { include = "tests" }]