You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
More often that not, in the microservices architecture, a single microservice operates against a single S3 bucket.
Spring Cloud AWS helps me eliminate verbose bean declarations and boilerplate code, but I still need to create a separate @ConfigurationProperties class to store attributes of bucket name and validity of presigned URL.
It'll be pretty cool to have the functionality to declare the default s3 bucket and presigned url validity (by default in seconds) in the Spring Cloud AWS configuration properties itself:
The above assumes the default validity of both GET and PUT presigned URL to be same. With the above configuration, the service could use the S3Template like below without the need of creating a custom configuration class.
Again, would like to point that this will only benefit the applications interacting with a single S3 bucket. Applications interacting with more than 1, can use the library with existing methods.
A similar functionality is available in SnsTemplate with method setDefaultDestinationName. But that does not give the functionality to define the topic name in .yaml or .properties file, as compared to the proposed solution above.
Additional context
Can submit PR if the feature is approved.
The text was updated successfully, but these errors were encountered:
hardikSinghBehl
changed the title
Functionality to declare default S3 bucket name and presigned URL validity
Ability to declare default S3 bucket name and presigned URL validity
May 4, 2024
Type: Feature
Is your feature request related to a problem? Please describe.
More often that not, in the microservices architecture, a single microservice operates against a single S3 bucket.
Spring Cloud AWS helps me eliminate verbose bean declarations and boilerplate code, but I still need to create a separate
@ConfigurationProperties
class to store attributes of bucket name and validity of presigned URL.A sample
.yaml
file snippet of a microservice:The above 2 custom properties are mapped to a
@ConfigurationProperties
class which is referenced when interacting withS3Template
:Describe the solution you'd like
It'll be pretty cool to have the functionality to declare the default s3 bucket and presigned url validity (by default in seconds) in the Spring Cloud AWS configuration properties itself:
The above assumes the default validity of both GET and PUT presigned URL to be same. With the above configuration, the service could use the
S3Template
like below without the need of creating a custom configuration class.Again, would like to point that this will only benefit the applications interacting with a single S3 bucket. Applications interacting with more than 1, can use the library with existing methods.
A similar functionality is available in
SnsTemplate
with methodsetDefaultDestinationName
. But that does not give the functionality to define the topic name in.yaml
or.properties
file, as compared to the proposed solution above.Additional context
Can submit PR if the feature is approved.
The text was updated successfully, but these errors were encountered: