Bug: Rename `s3` feature flag to `aws_s3`



Rename `s3` feature flag to `aws_s3`. This change is required so that current storage scheme becomes distinguishable, especially if in future new storage implementations like a AWS S3 alternative is integrated.
diff --git a/crates/router/Cargo.toml b/crates/router/Cargo.toml
index 8897fdac2c2..88272033fb0 100644
--- a/crates/router/Cargo.toml
+++ b/crates/router/Cargo.toml
@@ -10,12 +10,12 @@ license.workspace = true
 
 [features]
 default = ["kv_store", "stripe", "oltp", "olap", "backwards_compatibility", "accounts_cache", "dummy_connector", "payouts", "business_profile_routing", "connector_choice_mca_id", "profile_specific_fallback_routing", "retry", "frm"]
-s3 = ["dep:aws-sdk-s3", "dep:aws-config"]
+aws_s3 = ["dep:aws-sdk-s3", "dep:aws-config"]
 kms = ["external_services/kms", "dep:aws-config"]
 email = ["external_services/email", "dep:aws-config", "olap"]
 frm = []
 stripe = ["dep:serde_qs"]
-release = ["kms", "stripe", "s3", "email", "backwards_compatibility", "business_profile_routing", "accounts_cache", "kv_store", "connector_choice_mca_id", "profile_specific_fallback_routing", "vergen", "recon"]
+release = ["kms", "stripe", "aws_s3", "email", "backwards_compatibility", "business_profile_routing", "accounts_cache", "kv_store", "connector_choice_mca_id", "profile_specific_fallback_routing", "vergen", "recon"]
 olap = ["data_models/olap", "storage_impl/olap", "scheduler/olap", "dep:analytics"]
 oltp = ["storage_impl/oltp"]
 kv_store = ["scheduler/kv_store"]
diff --git a/crates/router/src/configs/settings.rs b/crates/router/src/configs/settings.rs
index 3d93c2f188b..b674c503542 100644
--- a/crates/router/src/configs/settings.rs
+++ b/crates/router/src/configs/settings.rs
@@ -88,7 +88,7 @@ pub struct Settings {
     pub api_keys: ApiKeys,
     #[cfg(feature = "kms")]
     pub kms: kms::KmsConfig,
-    #[cfg(feature = "s3")]
+    #[cfg(feature = "aws_s3")]
     pub file_upload_config: FileUploadConfig,
     pub tokenization: TokenizationConfig,
     pub connector_customer: ConnectorCustomer,
@@ -716,7 +716,7 @@ pub struct ApiKeys {
     pub expiry_reminder_days: Vec<u8>,
 }
 
-#[cfg(feature = "s3")]
+#[cfg(feature = "aws_s3")]
 #[derive(Debug, Deserialize, Clone, Default)]
 #[serde(default)]
 pub struct FileUploadConfig {
@@ -848,7 +848,7 @@ impl Settings {
         self.kms
             .validate()
             .map_err(|error| ApplicationError::InvalidConfigurationValueError(error.into()))?;
-        #[cfg(feature = "s3")]
+        #[cfg(feature = "aws_s3")]
         self.file_upload_config.validate()?;
         self.lock_settings.validate()?;
         self.events.validate()?;
diff --git a/crates/router/src/configs/validations.rs b/crates/router/src/configs/validations.rs
index 569262d0d21..0b286ece843 100644
--- a/crates/router/src/configs/validations.rs
+++ b/crates/router/src/configs/validations.rs
@@ -127,7 +127,7 @@ impl super::settings::DrainerSettings {
     }
 }
 
-#[cfg(feature = "s3")]
+#[cfg(feature = "aws_s3")]
 impl super::settings::FileUploadConfig {
     pub fn validate(&self) -> Result<(), ApplicationError> {
         use common_utils::fp_utils::when;
diff --git a/crates/router/src/core/files.rs b/crates/router/src/core/files.rs
index 13c4d3dfdf3..f3e56489806 100644
--- a/crates/router/src/core/files.rs
+++ b/crates/router/src/core/files.rs
@@ -1,8 +1,8 @@
 pub mod helpers;
-#[cfg(feature = "s3")]
+#[cfg(feature = "aws_s3")]
 pub mod s3_utils;
 
-#[cfg(not(feature = "s3"))]
+#[cfg(not(feature = "aws_s3"))]
 pub mod fs_utils;
 
 use api_models::files;
@@ -29,9 +29,9 @@ pub async fn files_create_core(
     )
     .await?;
     let file_id = common_utils::generate_id(consts::ID_LENGTH, "file");
-    #[cfg(feature = "s3")]
+    #[cfg(feature = "aws_s3")]
     let file_key = format!("{}/{}", merchant_account.merchant_id, file_id);
-    #[cfg(not(feature = "s3"))]
+    #[cfg(not(feature = "aws_s3"))]
     let file_key = format!("{}_{}", merchant_account.merchant_id, file_id);
     let file_new = diesel_models::file::FileMetadataNew {
         file_id: file_id.clone(),
diff --git a/crates/router/src/core/files/helpers.rs b/crates/router/src/core/files/helpers.rs
index 818067207f4..9205d42aeee 100644
--- a/crates/router/src/core/files/helpers.rs
+++ b/crates/router/src/core/files/helpers.rs
@@ -31,33 +31,33 @@ pub async fn get_file_purpose(field: &mut Field) -> Option<api::FilePurpose> {
 }
 
 pub async fn upload_file(
-    #[cfg(feature = "s3")] state: &AppState,
+    #[cfg(feature = "aws_s3")] state: &AppState,
     file_key: String,
     file: Vec<u8>,
 ) -> CustomResult<(), errors::ApiErrorResponse> {
-    #[cfg(feature = "s3")]
+    #[cfg(feature = "aws_s3")]
     return files::s3_utils::upload_file_to_s3(state, file_key, file).await;
-    #[cfg(not(feature = "s3"))]
+    #[cfg(not(feature = "aws_s3"))]
     return files::fs_utils::save_file_to_fs(file_key, file);
 }
 
 pub async fn delete_file(
-    #[cfg(feature = "s3")] state: &AppState,
+    #[cfg(feature = "aws_s3")] state: &AppState,
     file_key: String,
 ) -> CustomResult<(), errors::ApiErrorResponse> {
-    #[cfg(feature = "s3")]
+    #[cfg(feature = "aws_s3")]
     return files::s3_utils::delete_file_from_s3(state, file_key).await;
-    #[cfg(not(feature = "s3"))]
+    #[cfg(not(feature = "aws_s3"))]
     return files::fs_utils::delete_file_from_fs(file_key);
 }
 
 pub async fn retrieve_file(
-    #[cfg(feature = "s3")] state: &AppState,
+    #[cfg(feature = "aws_s3")] state: &AppState,
     file_key: String,
 ) -> CustomResult<Vec<u8>, errors::ApiErrorResponse> {
-    #[cfg(feature = "s3")]
+    #[cfg(feature = "aws_s3")]
     return files::s3_utils::retrieve_file_from_s3(state, file_key).await;
-    #[cfg(not(feature = "s3"))]
+    #[cfg(not(feature = "aws_s3"))]
     return files::fs_utils::retrieve_file_from_fs(file_key);
 }
 
@@ -134,7 +134,7 @@ pub async fn delete_file_using_file_id(
     match provider {
         diesel_models::enums::FileUploadProvider::Router => {
             delete_file(
-                #[cfg(feature = "s3")]
+                #[cfg(feature = "aws_s3")]
                 state,
                 provider_file_id,
             )
@@ -235,7 +235,7 @@ pub async fn retrieve_file_and_provider_file_id_from_file_id(
                 diesel_models::enums::FileUploadProvider::Router => Ok((
                     Some(
                         retrieve_file(
-                            #[cfg(feature = "s3")]
+                            #[cfg(feature = "aws_s3")]
                             state,
                             provider_file_id.clone(),
                         )
@@ -365,7 +365,7 @@ pub async fn upload_and_get_provider_provider_file_id_profile_id(
                 ))
             } else {
                 upload_file(
-                    #[cfg(feature = "s3")]
+                    #[cfg(feature = "aws_s3")]
                     state,
                     file_key.clone(),
                     create_file_request.file.clone(),

## Type of Change
<!-- Put an `x` in the boxes that apply -->

- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [x] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD

## Description
<!-- Describe your changes in detail -->
This PR renames s3 feature flag to aws_s3 so that current storage scheme is distinguishable, especially if in future new storage implementations like a AWS S3 alternative is integrated.

### Additional Changes

- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables

<!--
Provide links to the files with corresponding changes.

Following are the paths where you can find config files:
1. `config`
2. `crates/router/src/configs`
3. `loadtest/config`
-->


## Motivation and Context
<!--
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.

If you don't have an issue, we'd recommend starting with one first so the PR
can focus on the implementation (unless it is an obvious bug or documentation fix
that will have little conversation).
-->


## How did you test it?
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->
Just a rename of feature flag, so basic sanity testing should work

## Checklist
<!-- Put an `x` in the boxes that apply -->

- [x] I formatted the code `cargo +nightly fmt --all`
- [x] I addressed lints thrown by `cargo clippy`
- [x] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
- [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
