Releases: awspring/spring-cloud-aws
v3.0.0-M3
Spring Cloud AWS 3.0.0 M3 is the first release compatible with Spring Boot 3.0. At the same time, there is no compatibility anymore with Spring Boot 2.x.
The most notable changes:
- Migrate to Spring Boot 3.0 by @maciejwalkowiak in #503
- Sending SMS through SNS by @MatejNedic in #457
- Auto-Reload for SecretsManager&ParameterStoreproperty sources by @maciejwalkowiak in #536
π https://docs.awspring.io/spring-cloud-aws/docs/3.0.0-M3/reference/html/index.html
Full Changelog: v3.0.0-M2...v3.0.0-M3
Big thanks to all contributors!
Other changes
- Back to snapshots. by @maciejwalkowiak in #501
- Add links to API docs in readme. by @maciejwalkowiak in #504
- Remove legacy JDBC module. by @maciejwalkowiak in #505
- Generate Jacoco report and send to SonarCloud with GH action. by @maciejwalkowiak in #362
- Clean up pom.xmlby @maciejwalkowiak in #509
- Upgrade Spring Cloud to 3.1.3 by @maciejwalkowiak in #510
- SNS SMS support by @MatejNedic in #457
- Upgrade Localstack to 1.1.0 by @maciejwalkowiak in #511
- Do not use deprecated methods from testcontainers-localstack. by @maciejwalkowiak in #512
- Add package-info.javato DynamoDB auto-configuration. by @maciejwalkowiak in #513
- Polish. by @maciejwalkowiak in #514
- Remove spring-cloud-aws-startersmodule and refer each starter individually from the rootpom.xml. by @maciejwalkowiak in #516
- Add spring-cloud-aws-starter-metrics to dependencies by @eddumelendez in #522
- Fixes table formatting issue by @rajadilipkolli in #517
- Docs update for S3 and ParameterStore starter coordinates. by @sivaprasadreddy in #525
- Updated labeler.yml according to new modules and package structure. by @sivaprasadreddy in #526
- Adds aws starter for RegionProviderAutoConfiguration by @rajadilipkolli in #530
- Fix upgrading to Spring Boot 3 & Java 17. by @maciejwalkowiak in #539
- Upgrade AWS SDK versions. by @maciejwalkowiak in #541
- Upgrade Testcontainers to 1.17.5. by @maciejwalkowiak in #542
- Fix injecting SnsTemplateandSnsSmsTemplatebeans. by @maciejwalkowiak in #543
- Upgrade Localstack to 1.2.0 by @rajadilipkolli in #535
- Auto-Reload for SecretsManager&ParameterStoreproperty sources by @maciejwalkowiak in #536
- Reformat code. by @maciejwalkowiak in #546
- Replace @AutoConfigureMetricswith@AutoConfigureObservability. by @maciejwalkowiak in #545
- Upgrade AWS SDKs to 2.18.0and1.12.326. by @maciejwalkowiak in #547
- Set version to 3.0.0-M3 by @maciejwalkowiak in #548
New Contributors
- @rajadilipkolli made their first contribution in #517
Full Changelog: v3.0.0-M2...v3.0.0-M3
3.0.0-M2
M2 is the next milestone in our journey to rewrite Spring Cloud AWS to use AWS SDK v2.
The most important changes since M1:
SQS
Completely rewritten SQS integration π₯ #374:
- auto-configuration for SqsAsyncClient
- support for @SqsListener
- ability to create SQS listener with simple lambda without annotation
- support for batch listeners
- support for FIFO queues
- @SqsTestannotation for slice testing of SQS listeners
SqsTemplate for sending messages will be added in M3.
DynamoDB
New integration #339 π
- auto-configuration for DynamoDbClient
- DynamoDbTemplatesimplifying integration with DynamoDB Enhanced Client
- DAX support
CloudWatch
- auto-configuration for micrometer-registry-cloudwatch2#237
S3
Improvement to S3Resource:
- Add Ability to get metadata via S3Resource #451
Improvements to cross-region S3 client:
- Read bucket region from redirect header #453
- Use status code instead of message to detect region change #459
π https://docs.awspring.io/spring-cloud-aws/docs/3.0.0-M2/reference/html/index.html
Full Changelog: v3.0.0-M1...v3.0.0-M2
Big thanks to all contributors!
What's Changed
- Format code on make buildby @maciejwalkowiak in #430
- ci: update java 8 version by @mcruzdev in #435
- fix: fix upload-docs workflow by @mcruzdev in #438
- Dynamodb autoconfiguration by @MatejNedic in #339
- Add cloudwatch metrics auto-configuration with aws sdk v2 by @eddumelendez in #237
- Add Ability to get metadata via S3Resource by @sis-yoshiday in #451
- Use status code instead of message to detect region change by @fjmacagno in #459
- Add DynamoDB Accelerator (DAX) integration by @MatejNedic in #448
- Read bucket region from redirect header by @fjmacagno in #453
- CloudWatch docs by @eddumelendez in #477
- Add migration docs from 2.x to 3.x by @eddumelendez in #478
- Simplify generator path calculation by @fjmacagno in #480
- Simplify Region and Credentials providers autoconfigurations. by @maciejwalkowiak in #484
- Add SQS Support by @tomazfernandes in #374
- Port SqsTestto new SQS implementation. by @maciejwalkowiak in #493
- Upgrade AWS SDK. by @maciejwalkowiak in #497
- Use Localstack and cdklocalin samples. by @maciejwalkowiak in #381
New Contributors
- @sis-yoshiday made their first contribution in #451
- @fjmacagno made their first contribution in #459
- @tomazfernandes made their first contribution in #374
Full Changelog: v3.0.0-M1...v3.0.0-M2
2.4.2
- Upgrade AWS SDK to 1.12.266. #461 @maciejwalkowiak
- Fail on startup if sqs queue does not exist #394 @boolivar
- Reduce amount of logs in Parameter Store tests. #395 @maciejwalkowiak
Big thanks to all contributors!
π https://docs.awspring.io/spring-cloud-aws/docs/2.4.2/reference/html/index.html
3.0.0-M1
Spring Cloud AWS 3.0 is a rewrite of the project using AWS SDK v2 for Java. Since this has required a major refactoring, we took it as an opportunity to revisit all the assumptions and integrations modules. As a result, we've produced a library that is lightweight, flexible, causes less headache, provides simple to use abstractions and also works much better with Kotlin.
Only a subset of integrations have been migrated in M1:
- S3
- SES
- SNS
- Secrets Manager
- Parameter Store
We strongly recommend checking out completely rewritten reference documentation for a deep dive into each integration including code samples:
π https://docs.awspring.io/spring-cloud-aws/docs/3.0.0-M1/reference/html/index.html
Core
Dropped support for XML configuration and @EnableXXX annotations. Spring Cloud AWS can be used either with Spring Boot auto-configurations, or beans have to be created manually.
New properties prefix
All Spring Cloud AWS related properties have moved from cloud.aws to spring.cloud.aws prefix.
Endpoint configuration
Endpoint used by all integrations can be configured through a property:
spring.cloud.aws.endpoint=http://localhost:4566Endpoint used by an individual integration can be also defined per integration:
spring.cloud.aws.s3.endpoint=http://localhost:4566This is especially useful when Localstack is used instead of real AWS.
Credentials and region configuration
Credentials and region are resolved through the new interfaces from AWS SDK v2 for Java: software.amazon.awssdk.auth.credentials.AwsCredentialsProvider and software.amazon.awssdk.regions.providers.AwsRegionProvider.
It is possible to configure both through properties. In special cases, users can provide custom implementations of these interfaces to opt-out from ones that are auto-configured. Check the reference documentation for more details.
Nullability annotations
Every class field, method parameter and return value is annotated with @NonNull or @Nullable annotation, making it easier to use with null safe languages like Kotlin.
AWS Client Builder Configurers
AwsClientBuilderConfigurer simplifies applying same configuration for endpoint, region and credentials to user defined AWS clients beans:
import io.awspring.cloud.autoconfigure.core.AwsClientBuilderConfigurer;
...
@Bean
TextractClient textractClient(AwsClientBuilderConfigurer configurer) {
    return configurer.configure(TextractClient.builder()).build();
}AWS Client Customizers
AwsClientCustomizer simplifies customizing AWS clients created by integrations without overwriting complete beans:
import io.awspring.cloud.autoconfigure.core.AwsClientCustomizer;
...
@Component
class S3AwsClientClientConfigurer implements AwsClientCustomizer<S3ClientBuilder> {
	@Override
	public ClientOverrideConfiguration overrideConfiguration() {
		...
	}
	@Override
	public SdkHttpClient httpClient() {
		...
	}
}Note that AwsClientCustomizer is a parameterized type, and the type determines to which client customization gets applied.
S3
- all S3 related classes have moved to io.awspring.cloud.s3package.
- SimpleStorageResourcehas been renamed to- S3Resource
- S3 client can be configured with spring.cloud.aws.s3properties
- dropped support for ResourcePatternResolver.
Cross-Region S3 client
S3Client implementation provided by Spring Cloud AWS can access buckets in any region. When accessed bucket is in other region than the one provided for S3 auto-configuration, the CrossRegionS3Clients handles redirects sent by S3 transparently.
Output Streams
S3 integration comes with three implementations of the OutputStream used under the hood by S3Resource for writing data to S3.
- InMemoryBufferingS3OutputStream(default) - buffers content of the uploaded file in memory and uploads to S3 using multipart upload
- DiskBufferingS3OutputStream- saves uploaded file to temporary folder on disk and uploads to S3 in single chunk
- TransferManagerS3OutputStream- uses experimental Transfer Manager to upload files to S3. Requires adding a dependency to- software.amazon.awssdk:s3-transfer-manager
To use different output stream than one provided by auto-configuration, define a bean of type S3OutputStreamProvider - either with custom implementation or one of: DiskBufferingS3OutputStreamProvider, TransferManagerS3OutputStreamProvider, InMemoryBufferingS3OutputStreamProvider.
S3Template
S3Template is a new class that simplifies performing common operations on S3 buckets and S3 objects. It also supports reading and persisting Java objects to S3. Spring Cloud AWS provides Jackson based Jackson2JsonS3ObjectConverter which serialized persisted objects into JSON files. Custom object converted can be provided by defining a bean of type S3ObjectConverter.
Object Metadata Support
Both S3Resource and S3Template support setting object metadata through a builder-like object ObjectMetadata.
Content-Type Resolution
If uploaded file to S3 does not have contentType metadata property set, both S3Resource and S3Template will resolve content type through S3ObjectContentTypeResolver. The default implementation resolves content type by file extension. The framework provides a comprehensive support for 817 file extensions.
SES
SES integration does not bring any new features in comparison to what's offered in version 2.4.1.
SES integration can be configured using properties with spring.cloud.aws.ses prefix.
SNS
On top of what's been offered in 2.4.1, SNS integration provides a simple interfaces for sending notifications with custom payload and headers using SnsOperations#sendNotification method and SnsNotification object.
Because SNS Message Manager has not been migrated to AWS SDK v2, we had to drop support for message signature validation. We hope AWS finishes migration before Spring Cloud AWS reaches 3.0 GA.
SNS integration can be configured using properties with spring.cloud.aws.sns prefix.
Secrets Manager
- dropped support for loading properties from Secrets Manager using Spring Cloud Bootstrap - only loading through spring.config.import=aws-secretsmanageris now possible
- added support for loading both secrets containing JSON and plain text
- simplified using custom SecretsManagerClient
Secrets Manager integration can be configured using properties with spring.cloud.aws.secretsmanager prefix.
Parameter Store
- dropped support for loading properties from Parameter Store using Spring Cloud Bootstrap - only loading through spring.config.import=aws-parameterstoreis now possible
- simplified using custom SsmClient
Parameter Store integration can be configured using properties with spring.cloud.aws.parameterstore prefix.
Reference Documentation
Reference documentation has been rewritten with simplicity and "straight to the point" attitude.
π https://docs.awspring.io/spring-cloud-aws/docs/3.0.0-M1/reference/html/index.html
Feedback
We are aware that this release breaks existing code but this was the only sensible way we could evolve the framework and meet the demand in constrained time we have. We are very open for your feedback and appreciate any shoutout on social media and Github βοΈ.
This release would not happen without our wonderful community. Big thanks for your bug reports, ideas and pull requests!
New Contributors
- @mcruzdev made their first contribution in #76
- @zeldigas made their first contribution in #310
- @anthonyfoulfoin made their first contribution in #338
- @willome made their first contribution in #353
- @anugrahsinghal made their first contribution in #360
- @krimsz made their first contribution in #361
- @sgarfinkel made their first contribution in #400
Full Changelog: v2.4.1...v3.0.0-M1
2.3.5
This release backports a fix from 2.4.1 to 2.3.x for Spring Boot 2.4 & 2.5 compatibility
- Relax prefix validation rules in Parameter Store and Secrets Manager #304 @MatejNedic
π https://docs.awspring.io/spring-cloud-aws/docs/2.3.5/reference/html/index.html
2.4.1
- Relax prefix validation rules in Parameter Store and Secrets Manager #303 @MatejNedic
- Configure signing region when endpoint is overwritten. #272 @maciejwalkowiak
- Mention Spring Integration AWS and Spring Cloud Stream AWS Kinesis Binder projects in docs #288 @maciejwalkowiak
- Adds array properties support to Parameter Store. #248 @rmpestano
- Upgrade AWS SDK to 1.12.195 #304 @maciejwalkowiak
Big thanks to all contributors!
π https://docs.awspring.io/spring-cloud-aws/docs/2.4.1/reference/html/index.html
2.4.0
This version brings compatibility with Spring Boot 2.6 and few enhancements:
SQS
Add @SqsTest annotation to simplify SQS integration testing (#235) @maciejwalkowiak
Complete example on how to test SQS listener with @SqsTest, Localstack and Testcontainers.
SNS
Verify SNS messages in HTTP subscription mode (#240) @MatejNedic @WtfJoke @maciejwalkowiak
Core
Upgrade to Spring Cloud Build commons to 3.1.0 (#211) @spencergibb
Big thanks to all contributors!
π https://docs.awspring.io/spring-cloud-aws/docs/2.4.0/reference/html/index.html
2.3.4
This version brings several bug fixes and small improvements:
Parameter Store & Secrets Manager
- Fix logging for Parameter Store and Secrets Manager integrations (#229) @maciejwalkowiak
- Allow empty prefix in Secrets Manager and Parameter Store integrationns (#233, #216) @MatejNedic @menneske2
- Fix property loading order for Parameter Store and Secrets Manager when used with Spring Cloud Bootstrap (#225) @maciejwalkowiak
SQS
- Autoconfigure QueueMessagingTemplate(#230) @maciejwalkowiak
- Fix handling errors when processing SQS FIFO queue (#192) @fernandomoraes
- Ensure that SqsMessageDeletionPolicyisNO_REDRIVEif one provided by parameter isnull. (#231) @maciejwalkowiak
Core
Big thanks to all contributors!
π https://docs.awspring.io/spring-cloud-aws/docs/2.3.4/reference/html/index.html
2.3.3
This version solves bumps a spring-messaging dependency to 5.3.13. Previous Spring Cloud AWS versions relied on spring-messaging that suffered from a security vulnerability (#206). If you relied on Spring Cloud AWS to determine spring-messaging version, please update to Spring Cloud AWS 2.3.3.
Changes:
- Fix: context order when loading properties (Parameter Store and Secrets Manager) - @WtfJoke
- Docs: Mention no Aurora support in RDS docs (RDS) - @aravindparappil46
- Dependency Upgrade: Upgrade Maven Wrapper - @tinexw
- Enhancement: Log exception on message processing failure (SQS) - @ebussieres
- Dependency Upgrade: Upgrade Spring Cloud Build to 3.0.5 - @maciejwalkowiak
- Dependency Upgrade: Upgrade AWS SDK to 1.12.129 - @maciejwalkowiak
Big thanks to contributors and @MatejNedic & @eddumelendez for reviews and support!
π https://docs.awspring.io/spring-cloud-aws/docs/2.3.3/reference/html/index.html
2.3.2
- Fix: Prevent registering beans more than once in Parameter Store and Secrets Manager integration #142 (Parameter Store & Secrets Manager) - @MatejNedic
- Fix: Prefix not being validated for other slashes #147 (Parameters Store & Secrets Manager) - @MatejNedic
- Fix: Execute all messages received from SQS #138 (SQS) - @LeonieAdis
- Feat: Add SNS FIFO Topic support #130 (SNS) - @codingtim
Thanks to @neiljbrown @shawnjohnson @SergeiKhmelevSPA @joaomlneto for improving the reference documentation!
π http://docs.awspring.io/spring-cloud-aws/docs/2.3.2/reference/html/index.html