├── .editorconfig ├── .github ├── CODEOWNERS ├── CONTRIBUTING.md ├── FUNDING.yml ├── ISSUE_TEMPLATE.md ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── dependabot.yml ├── labeler.yml ├── pull_request_template.md ├── triage-rules.yml └── workflows │ ├── build.yml │ ├── issue-triager.yml │ ├── labeler.yml │ ├── release.yml │ └── upload-docs.yml ├── .gitignore ├── .gitpod.yml ├── .idea └── vcs.xml ├── .mvn ├── jvm.config ├── maven.config └── wrapper │ ├── MavenWrapperDownloader.java │ ├── maven-wrapper.jar │ └── maven-wrapper.properties ├── .settings.xml ├── CONTRIBUTING.md ├── LICENSE.txt ├── Makefile ├── README.md ├── SECURITY.md ├── docs ├── pom.xml └── src │ └── main │ ├── .DS_Store │ └── asciidoc │ ├── _attributes.adoc │ ├── _configprops.adoc │ ├── appendix.adoc │ ├── cloudwatch.adoc │ ├── contributing.adoc │ ├── core.adoc │ ├── docker-compose.adoc │ ├── dynamodb.adoc │ ├── imds.adoc │ ├── index.adoc │ ├── intro.adoc │ ├── migration.adoc │ ├── parameter-store.adoc │ ├── s3.adoc │ ├── secrets-manager.adoc │ ├── ses.adoc │ ├── sns.adoc │ ├── spring-cloud-aws.adoc │ ├── spring-modulith.adoc │ ├── sqs.adoc │ └── testing.adoc ├── eclipse-code-formatter.xml ├── license-header.txt ├── mvnw ├── mvnw.cmd ├── pom.xml ├── spring-cloud-aws-autoconfigure ├── pom.xml └── src │ ├── main │ ├── java │ │ └── io │ │ │ └── awspring │ │ │ └── cloud │ │ │ └── autoconfigure │ │ │ ├── AwsAsyncClientCustomizer.java │ │ │ ├── AwsClientCustomizer.java │ │ │ ├── AwsClientProperties.java │ │ │ ├── AwsSyncClientCustomizer.java │ │ │ ├── config │ │ │ ├── AbstractAwsConfigDataLocationResolver.java │ │ │ ├── BootstrapLoggingHelper.java │ │ │ ├── ConfigStoreRuntimeHints.java │ │ │ ├── package-info.java │ │ │ ├── parameterstore │ │ │ │ ├── AwsParameterStoreClientCustomizer.java │ │ │ │ ├── ParameterStoreAutoConfiguration.java │ │ │ │ ├── ParameterStoreConfigDataLoader.java │ │ │ │ ├── ParameterStoreConfigDataLocationResolver.java │ │ │ │ ├── ParameterStoreConfigDataResource.java │ │ │ │ ├── ParameterStoreKeysMissingException.java │ │ │ │ ├── ParameterStoreMissingKeysFailureAnalyzer.java │ │ │ │ ├── ParameterStoreProperties.java │ │ │ │ ├── ParameterStorePropertySources.java │ │ │ │ ├── ParameterStoreReloadAutoConfiguration.java │ │ │ │ ├── SsmClientCustomizer.java │ │ │ │ └── package-info.java │ │ │ ├── reload │ │ │ │ ├── ConfigurationChangeDetector.java │ │ │ │ ├── ConfigurationUpdateStrategy.java │ │ │ │ ├── PollingAwsPropertySourceChangeDetector.java │ │ │ │ ├── ReloadProperties.java │ │ │ │ ├── ReloadStrategy.java │ │ │ │ └── package-info.java │ │ │ ├── s3 │ │ │ │ ├── S3ConfigDataLoader.java │ │ │ │ ├── S3ConfigDataLocationResolver.java │ │ │ │ ├── S3ConfigDataResource.java │ │ │ │ ├── S3KeysMissingException.java │ │ │ │ ├── S3MissingKeysFailureAnalyzer.java │ │ │ │ ├── S3PropertySources.java │ │ │ │ ├── S3ReloadAutoConfiguration.java │ │ │ │ └── package-info.java │ │ │ └── secretsmanager │ │ │ │ ├── AwsSecretsManagerClientCustomizer.java │ │ │ │ ├── SecretsManagerAutoConfiguration.java │ │ │ │ ├── SecretsManagerClientCustomizer.java │ │ │ │ ├── SecretsManagerConfigDataLoader.java │ │ │ │ ├── SecretsManagerConfigDataLocationResolver.java │ │ │ │ ├── SecretsManagerConfigDataResource.java │ │ │ │ ├── SecretsManagerKeysMissingException.java │ │ │ │ ├── SecretsManagerMissingKeysFailureAnalyzer.java │ │ │ │ ├── SecretsManagerProperties.java │ │ │ │ ├── SecretsManagerPropertySources.java │ │ │ │ ├── SecretsManagerReloadAutoConfiguration.java │ │ │ │ └── package-info.java │ │ │ ├── core │ │ │ ├── AwsAutoConfiguration.java │ │ │ ├── AwsClientBuilderConfigurer.java │ │ │ ├── AwsClientCustomizer.java │ │ │ ├── AwsConnectionDetails.java │ │ │ ├── AwsProperties.java │ │ │ ├── CoreAOT.java │ │ │ ├── CredentialsProperties.java │ │ │ ├── CredentialsProviderAutoConfiguration.java │ │ │ ├── Profile.java │ │ │ ├── RegionProperties.java │ │ │ ├── RegionProviderAutoConfiguration.java │ │ │ ├── StsProperties.java │ │ │ └── package-info.java │ │ │ ├── dynamodb │ │ │ ├── DaxProperties.java │ │ │ ├── DynamoDbAutoConfiguration.java │ │ │ ├── DynamoDbClientCustomizer.java │ │ │ ├── DynamoDbProperties.java │ │ │ └── package-info.java │ │ │ ├── imds │ │ │ ├── ImdsAutoConfiguration.java │ │ │ ├── ImdsPropertySource.java │ │ │ ├── ImdsUtils.java │ │ │ └── package-info.java │ │ │ ├── metrics │ │ │ ├── CloudWatchAsyncClientCustomizer.java │ │ │ ├── CloudWatchExportAutoConfiguration.java │ │ │ ├── CloudWatchProperties.java │ │ │ ├── CloudWatchPropertiesConfigAdapter.java │ │ │ ├── CloudWatchRegistryProperties.java │ │ │ └── package-info.java │ │ │ ├── package-info.java │ │ │ ├── s3 │ │ │ ├── S3AesProvider.java │ │ │ ├── S3AutoConfiguration.java │ │ │ ├── S3ClientCustomizer.java │ │ │ ├── S3CrtAsyncClientAutoConfiguration.java │ │ │ ├── S3EncryptionClientCustomizer.java │ │ │ ├── S3EncryptionConditional.java │ │ │ ├── S3RsaProvider.java │ │ │ ├── S3TransferManagerAutoConfiguration.java │ │ │ ├── package-info.java │ │ │ └── properties │ │ │ │ ├── S3ConfigProperties.java │ │ │ │ ├── S3CrtClientProperties.java │ │ │ │ ├── S3EncryptionProperties.java │ │ │ │ ├── S3PluginProperties.java │ │ │ │ ├── S3Properties.java │ │ │ │ ├── S3TransferManagerProperties.java │ │ │ │ └── package-info.java │ │ │ ├── ses │ │ │ ├── SesAutoConfiguration.java │ │ │ ├── SesClientCustomizer.java │ │ │ ├── SesProperties.java │ │ │ └── package-info.java │ │ │ ├── sns │ │ │ ├── SnsAutoConfiguration.java │ │ │ ├── SnsClientCustomizer.java │ │ │ ├── SnsProperties.java │ │ │ └── package-info.java │ │ │ └── sqs │ │ │ ├── SqsAsyncClientCustomizer.java │ │ │ ├── SqsAutoConfiguration.java │ │ │ ├── SqsProperties.java │ │ │ └── package-info.java │ └── resources │ │ └── META-INF │ │ ├── additional-spring-configuration-metadata.json │ │ ├── spring.factories │ │ └── spring │ │ ├── aot.factories │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ └── test │ ├── java │ └── io │ │ └── awspring │ │ └── cloud │ │ └── autoconfigure │ │ ├── ConfiguredAwsClient.java │ │ ├── ConfiguredAwsPresigner.java │ │ ├── config │ │ ├── parameterstore │ │ │ ├── ParameterStoreAutoConfigurationTest.java │ │ │ ├── ParameterStoreConfigDataLoaderIntegrationTests.java │ │ │ ├── ParameterStoreReloadAutoConfigurationTests.java │ │ │ └── SsmClientCustomizerTests.java │ │ ├── s3 │ │ │ ├── S3ConfigDataLoaderIntegrationTests.java │ │ │ └── S3ReloadAutoConfigurationTests.java │ │ └── secretsmanager │ │ │ ├── SecretsManagerAutoConfigurationTests.java │ │ │ ├── SecretsManagerClientCustomizerTests.java │ │ │ ├── SecretsManagerConfigDataLoaderIntegrationTests.java │ │ │ └── SecretsManagerReloadAutoConfigurationTests.java │ │ ├── core │ │ ├── AwsAutoConfigurationTests.java │ │ ├── AwsClientCustomizerTests.java │ │ ├── CredentialsProviderAutoConfigurationTests.java │ │ └── RegionProviderAutoConfigurationTests.java │ │ ├── dynamodb │ │ ├── ConfiguredDaxClient.java │ │ ├── DynamoDbAutoConfigurationTest.java │ │ └── DynamoDbClientCustomizerTests.java │ │ ├── imds │ │ ├── ImdsAutoConfigurationIntegrationTest.java │ │ ├── ImdsAutoConfigurationTest.java │ │ ├── ImdsPropertySourceTest.java │ │ └── ImdsUtilsTest.java │ │ ├── metrics │ │ ├── CloudWatchAsyncClientCustomizerTests.java │ │ ├── CloudWatchExportAutoConfigurationIntegrationTests.java │ │ └── CloudWatchExportAutoConfigurationTest.java │ │ ├── s3 │ │ ├── ConfiguredTransferManager.java │ │ ├── S3AutoConfigurationTests.java │ │ ├── S3ClientCustomizerTests.java │ │ ├── S3CrtAsyncClientAutoConfigurationTests.java │ │ ├── S3TransferManagerAutoConfigurationTests.java │ │ └── provider │ │ │ ├── MyAesProvider.java │ │ │ └── MyRsaProvider.java │ │ ├── ses │ │ ├── SesAutoConfigurationTest.java │ │ └── SesClientCustomizerTests.java │ │ ├── sns │ │ ├── SnsAutoConfigurationTest.java │ │ └── SnsClientCustomizerTests.java │ │ └── sqs │ │ ├── SqsAsyncClientCustomizerTests.java │ │ ├── SqsAutoConfigurationIntegrationTest.java │ │ └── SqsAutoConfigurationTest.java │ └── resources │ ├── config.properties │ ├── config_second.properties │ ├── io │ └── awspring │ │ └── cloud │ │ └── autoconfigure │ │ └── core │ │ ├── CredentialsProviderAutoConfigurationTests-profile │ │ ├── RegionProviderAutoConfigurationTests-profile │ │ └── SesAutoConfigurationTest-profile │ └── logback.xml ├── spring-cloud-aws-core ├── pom.xml └── src │ ├── main │ ├── java │ │ └── io │ │ │ └── awspring │ │ │ └── cloud │ │ │ └── core │ │ │ ├── AWSCoreRuntimeHints.java │ │ │ ├── SpringCloudClientConfiguration.java │ │ │ ├── config │ │ │ ├── AwsPropertySource.java │ │ │ └── package-info.java │ │ │ ├── package-info.java │ │ │ └── region │ │ │ ├── StaticRegionProvider.java │ │ │ └── package-info.java │ └── resources │ │ ├── META-INF │ │ └── spring │ │ │ └── aot.factories │ │ └── io │ │ └── awspring │ │ └── cloud │ │ └── core │ │ └── SpringCloudClientConfiguration.properties │ └── test │ └── java │ └── io │ └── awspring │ └── cloud │ └── core │ └── SpringCloudClientConfigurationTests.java ├── spring-cloud-aws-dependencies └── pom.xml ├── spring-cloud-aws-docker-compose ├── pom.xml └── src │ ├── main │ ├── java │ │ └── io │ │ │ └── awspring │ │ │ └── cloud │ │ │ └── docker │ │ │ └── compose │ │ │ ├── AwsDockerComposeConnectionDetailsFactory.java │ │ │ ├── LocalStackEnvironment.java │ │ │ └── package-info.java │ └── resources │ │ └── META-INF │ │ └── spring.factories │ └── test │ ├── java │ └── io │ │ └── awspring │ │ └── cloud │ │ └── docker │ │ └── compose │ │ ├── AwsDockerComposeConnectionDetailsFactoryTest.java │ │ └── LocalStackEnvironmentTest.java │ └── resources │ └── docker-compose.yaml ├── spring-cloud-aws-dynamodb ├── pom.xml └── src │ ├── main │ └── java │ │ └── io │ │ └── awspring │ │ └── cloud │ │ └── dynamodb │ │ ├── DefaultDynamoDbTableNameResolver.java │ │ ├── DefaultDynamoDbTableSchemaResolver.java │ │ ├── DynamoDbOperations.java │ │ ├── DynamoDbTableNameResolver.java │ │ ├── DynamoDbTableSchemaResolver.java │ │ ├── DynamoDbTemplate.java │ │ └── package-info.java │ └── test │ ├── java │ └── io │ │ └── awspring │ │ └── cloud │ │ └── dynamodb │ │ ├── Book.java │ │ ├── DynamoDbTableNameResolverTest.java │ │ ├── DynamoDbTableSchemaResolverTest.java │ │ ├── DynamoDbTemplateIntegrationTest.java │ │ ├── FakePerson.java │ │ ├── Person.java │ │ └── PersonEntity.java │ └── resources │ └── logback.xml ├── spring-cloud-aws-modulith ├── pom.xml ├── spring-cloud-aws-modulith-events-sns │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── io │ │ │ │ └── awspring │ │ │ │ └── cloud │ │ │ │ └── modulith │ │ │ │ └── events │ │ │ │ └── sns │ │ │ │ ├── SnsEventExternalizerConfiguration.java │ │ │ │ └── package-info.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── spring │ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ │ └── test │ │ ├── java │ │ └── io │ │ │ └── awspring │ │ │ └── cloud │ │ │ └── modulith │ │ │ └── events │ │ │ └── sns │ │ │ ├── SnsEventExternalizerConfigurationIntegrationTests.java │ │ │ └── SnsEventPublicationIntegrationTests.java │ │ └── resources │ │ ├── application.properties │ │ └── logback.xml └── spring-cloud-aws-modulith-events-sqs │ ├── pom.xml │ └── src │ ├── main │ ├── java │ │ └── io │ │ │ └── awspring │ │ │ └── cloud │ │ │ └── modulith │ │ │ └── events │ │ │ └── sqs │ │ │ ├── SqsEventExternalizerConfiguration.java │ │ │ └── package-info.java │ └── resources │ │ └── META-INF │ │ └── spring │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports │ └── test │ ├── java │ └── io │ │ └── awspring │ │ └── cloud │ │ └── modulith │ │ └── events │ │ └── sqs │ │ ├── SqsEventExternalizerConfigurationIntegrationTests.java │ │ └── SqsEventPublicationIntegrationTests.java │ └── resources │ ├── application.properties │ └── logback.xml ├── spring-cloud-aws-parameter-store ├── pom.xml └── src │ ├── main │ └── java │ │ └── io │ │ └── awspring │ │ └── cloud │ │ └── parameterstore │ │ ├── ParameterStorePropertySource.java │ │ └── package-info.java │ └── test │ └── java │ └── io │ └── awspring │ └── cloud │ └── parameterstore │ └── ParameterStorePropertySourceTest.java ├── spring-cloud-aws-s3 ├── pom.xml └── src │ ├── main │ ├── java │ │ └── io │ │ │ └── awspring │ │ │ └── cloud │ │ │ └── s3 │ │ │ ├── AbstractTempFileS3OutputStream.java │ │ │ ├── DiskBufferingS3OutputStream.java │ │ │ ├── DiskBufferingS3OutputStreamProvider.java │ │ │ ├── InMemoryBufferingS3OutputStream.java │ │ │ ├── InMemoryBufferingS3OutputStreamProvider.java │ │ │ ├── Jackson2JsonS3ObjectConverter.java │ │ │ ├── Location.java │ │ │ ├── ObjectMetadata.java │ │ │ ├── PropertiesS3ObjectContentTypeResolver.java │ │ │ ├── S3Exception.java │ │ │ ├── S3ObjectContentTypeResolver.java │ │ │ ├── S3ObjectConverter.java │ │ │ ├── S3Operations.java │ │ │ ├── S3OutputStream.java │ │ │ ├── S3OutputStreamProvider.java │ │ │ ├── S3PathMatchingResourcePatternResolver.java │ │ │ ├── S3ProtocolResolver.java │ │ │ ├── S3Resource.java │ │ │ ├── S3RuntimeHints.java │ │ │ ├── S3Template.java │ │ │ ├── TransferManagerS3OutputStream.java │ │ │ ├── TransferManagerS3OutputStreamProvider.java │ │ │ ├── UploadFailedException.java │ │ │ ├── config │ │ │ └── S3PropertySource.java │ │ │ └── package-info.java │ └── resources │ │ ├── META-INF │ │ └── spring │ │ │ └── aot.factories │ │ └── io │ │ └── awspring │ │ └── cloud │ │ └── s3 │ │ └── S3ObjectContentTypeResolver.properties │ └── test │ ├── java │ └── io │ │ └── awspring │ │ └── cloud │ │ └── s3 │ │ ├── DiskBufferingS3OutputStreamTests.java │ │ ├── InMemoryBufferingS3OutputStreamTests.java │ │ ├── ObjectMetadataTests.java │ │ ├── PropertiesS3ObjectContentTypeResolverTests.java │ │ ├── S3PathMatchingResourcePatternResolverTests.java │ │ ├── S3ProtocolResolverTests.java │ │ ├── S3ResourceIntegrationTests.java │ │ ├── S3ResourceTests.java │ │ ├── S3TemplateIntegrationTests.java │ │ ├── S3TemplateTests.java │ │ ├── TransferManagerS3OutputStreamTests.java │ │ └── config │ │ └── S3PropertySourceTest.java │ └── resources │ └── logback.xml ├── spring-cloud-aws-samples ├── .gitignore ├── .npmignore ├── docker-compose.yml ├── infrastructure │ ├── cdk.json │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── io │ │ └── awspring │ │ └── cloud │ │ └── samples │ │ └── infrastructure │ │ ├── InfrastructureApp.java │ │ └── InfrastructureStack.java ├── pom.xml ├── readme.md ├── spring-cloud-aws-docker-compose-sample │ ├── docker-compose.yaml │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── io │ │ │ └── awspring │ │ │ └── cloud │ │ │ └── samples │ │ │ └── docker │ │ │ └── compose │ │ │ └── Application.java │ │ └── resources │ │ └── application.properties ├── spring-cloud-aws-dynamodb-sample │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── io │ │ │ │ └── awspring │ │ │ │ └── cloud │ │ │ │ └── samples │ │ │ │ └── dynamodb │ │ │ │ ├── App.java │ │ │ │ └── Department.java │ │ └── resources │ │ │ └── application.properties │ │ └── test │ │ └── java │ │ └── io │ │ └── awspring │ │ └── cloud │ │ └── samples │ │ └── dynamodb │ │ └── AppTest.java ├── spring-cloud-aws-parameter-store-sample │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── io │ │ │ └── awspring │ │ │ └── cloud │ │ │ └── samples │ │ │ └── parameterstore │ │ │ └── SpringCloudAwsParameterStoreSample.java │ │ └── resources │ │ └── application.properties ├── spring-cloud-aws-s3-sample │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── io │ │ │ └── awspring │ │ │ └── cloud │ │ │ └── samples │ │ │ └── s3 │ │ │ ├── FileController.java │ │ │ ├── ObjectStorageController.java │ │ │ └── SpringCloudAwsS3Sample.java │ │ └── resources │ │ └── application.properties ├── spring-cloud-aws-secrets-manager-sample │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── io │ │ │ └── awspring │ │ │ └── cloud │ │ │ └── samples │ │ │ └── secretsmanager │ │ │ └── App.java │ │ └── resources │ │ └── application.yml ├── spring-cloud-aws-ses-sample │ ├── docker-compose.yml │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── io │ │ │ └── awspring │ │ │ └── cloud │ │ │ └── samples │ │ │ └── ses │ │ │ └── MailSendingApplication.java │ │ └── resources │ │ ├── answer.txt │ │ └── application.properties ├── spring-cloud-aws-sns-sample │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── io │ │ │ └── awspring │ │ │ └── cloud │ │ │ └── sns │ │ │ └── sample │ │ │ ├── NotificationMappingController.java │ │ │ └── SpringSNSSample.java │ │ └── resources │ │ └── application.properties └── spring-cloud-aws-sqs-sample │ ├── pom.xml │ └── src │ └── main │ ├── java │ └── io │ │ └── awspring │ │ └── cloud │ │ └── sqs │ │ └── sample │ │ ├── SpringSqsListenMultipleQueues.java │ │ ├── SpringSqsSample.java │ │ ├── SqsManualAckSample.java │ │ └── SqsManualContainerInstantiationSample.java │ └── resources │ └── application.properties ├── spring-cloud-aws-secrets-manager ├── pom.xml └── src │ ├── main │ └── java │ │ └── io │ │ └── awspring │ │ └── cloud │ │ └── secretsmanager │ │ ├── SecretsManagerPropertySource.java │ │ └── package-info.java │ └── test │ └── java │ └── io │ └── awspring │ └── cloud │ └── secretsmanager │ └── SecretsManagerPropertySourceTest.java ├── spring-cloud-aws-ses ├── pom.xml └── src │ ├── main │ └── java │ │ └── io │ │ └── awspring │ │ └── cloud │ │ └── ses │ │ ├── SimpleEmailServiceJavaMailSender.java │ │ ├── SimpleEmailServiceMailSender.java │ │ └── package-info.java │ └── test │ └── java │ └── io │ └── awspring │ └── cloud │ └── ses │ ├── SimpleEmailServiceJavaMailSenderTest.java │ └── SimpleEmailServiceMailSenderTest.java ├── spring-cloud-aws-sns ├── pom.xml └── src │ ├── main │ ├── java │ │ └── io │ │ │ └── awspring │ │ │ └── cloud │ │ │ └── sns │ │ │ ├── SnsRuntimeHints.java │ │ │ ├── annotation │ │ │ ├── endpoint │ │ │ │ ├── NotificationMessageMapping.java │ │ │ │ ├── NotificationSubscriptionMapping.java │ │ │ │ ├── NotificationUnsubscribeConfirmationMapping.java │ │ │ │ ├── SnsControllerMappingReflectiveProcessor.java │ │ │ │ └── package-info.java │ │ │ └── handlers │ │ │ │ ├── NotificationMessage.java │ │ │ │ ├── NotificationSubject.java │ │ │ │ └── package-info.java │ │ │ ├── configuration │ │ │ ├── NotificationHandlerMethodArgumentResolverConfigurationUtils.java │ │ │ └── package-info.java │ │ │ ├── core │ │ │ ├── CachingTopicArnResolver.java │ │ │ ├── DefaultTopicArnResolver.java │ │ │ ├── MessageAttributeDataTypes.java │ │ │ ├── SnsHeaders.java │ │ │ ├── SnsNotification.java │ │ │ ├── SnsOperations.java │ │ │ ├── SnsTemplate.java │ │ │ ├── TopicArnResolver.java │ │ │ ├── TopicMessageChannel.java │ │ │ ├── TopicNotFoundException.java │ │ │ ├── TopicsListingTopicArnResolver.java │ │ │ └── package-info.java │ │ │ ├── handlers │ │ │ ├── AbstractNotificationMessageHandlerMethodArgumentResolver.java │ │ │ ├── NotificationMessageHandlerMethodArgumentResolver.java │ │ │ ├── NotificationStatus.java │ │ │ ├── NotificationStatusHandlerMethodArgumentResolver.java │ │ │ ├── NotificationSubjectHandlerMethodArgumentResolver.java │ │ │ └── package-info.java │ │ │ ├── package-info.java │ │ │ └── sms │ │ │ ├── AttributeCodes.java │ │ │ ├── SmsMessageAttributes.java │ │ │ ├── SmsType.java │ │ │ ├── SnsSmsOperations.java │ │ │ ├── SnsSmsTemplate.java │ │ │ └── package-info.java │ └── resources │ │ └── META-INF │ │ └── spring │ │ └── aot.factories │ └── test │ ├── java │ └── io │ │ └── awspring │ │ └── cloud │ │ └── sns │ │ ├── Matchers.java │ │ ├── Person.java │ │ ├── core │ │ ├── SnsTemplateTest.java │ │ ├── TopicMessageChannelTest.java │ │ └── TopicsListingTopicArnResolverTest.java │ │ ├── endpoint │ │ ├── ComplexNotificationEndpointControllerTest.java │ │ ├── MethodEndpointControllerTest.java │ │ ├── NotificationEndpointControllerTest.java │ │ └── SnsControllerMappingReflectiveProcessorTest.java │ │ ├── handlers │ │ ├── BaseNotificationMessageHandlerMethodArgumentResolverTest.java │ │ ├── NotificationMessageHandlerMethodArgumentResolverTest.java │ │ ├── NotificationMethods.java │ │ ├── NotificationStatusHandlerMethodArgumentResolverTest.java │ │ └── NotificationSubjectHandlerMethodArgumentResolverTest.java │ │ ├── integration │ │ └── SnsTemplateIntegrationTest.java │ │ └── sms │ │ ├── SmsMessageAttributesConverterTest.java │ │ ├── SnsSmsTemplateIntegrationTest.java │ │ └── SnsSmsTemplateTest.java │ └── resources │ ├── logback.xml │ ├── notificationMessage-complexObject-UTF-8-Check.json │ ├── notificationMessage-complexObject.json │ ├── notificationMessage.json │ ├── subscriptionConfirmation.json │ └── unsubscribeConfirmation.json ├── spring-cloud-aws-sqs ├── pom.xml └── src │ ├── main │ └── java │ │ └── io │ │ └── awspring │ │ └── cloud │ │ └── sqs │ │ ├── CollectionUtils.java │ │ ├── CompletableFutures.java │ │ ├── ConfigUtils.java │ │ ├── ExceptionUtils.java │ │ ├── FifoUtils.java │ │ ├── LifecycleHandler.java │ │ ├── MessageExecutionThread.java │ │ ├── MessageExecutionThreadFactory.java │ │ ├── MessageHeaderUtils.java │ │ ├── MessagingHeaders.java │ │ ├── QueueAttributesResolver.java │ │ ├── QueueAttributesResolvingException.java │ │ ├── SqsAcknowledgementException.java │ │ ├── SqsException.java │ │ ├── UnsupportedThreadFactoryException.java │ │ ├── annotation │ │ ├── AbstractListenerAnnotationBeanPostProcessor.java │ │ ├── SnsNotificationMessage.java │ │ ├── SnsNotificationSubject.java │ │ ├── SqsListener.java │ │ ├── SqsListenerAcknowledgementMode.java │ │ ├── SqsListenerAnnotationBeanPostProcessor.java │ │ └── package-info.java │ │ ├── config │ │ ├── AbstractEndpoint.java │ │ ├── AbstractMessageListenerContainerFactory.java │ │ ├── Endpoint.java │ │ ├── EndpointRegistrar.java │ │ ├── HandlerMethodEndpoint.java │ │ ├── MessageListenerContainerFactory.java │ │ ├── SqsBeanNames.java │ │ ├── SqsBootstrapConfiguration.java │ │ ├── SqsEndpoint.java │ │ ├── SqsListenerConfigurer.java │ │ ├── SqsMessageListenerContainerFactory.java │ │ └── package-info.java │ │ ├── listener │ │ ├── AbstractContainerOptions.java │ │ ├── AbstractMessageListenerContainer.java │ │ ├── AbstractPipelineMessageListenerContainer.java │ │ ├── AsyncAdapterBlockingExecutionFailedException.java │ │ ├── AsyncComponentAdapters.java │ │ ├── AsyncMessageListener.java │ │ ├── BackPressureHandler.java │ │ ├── BackPressureMode.java │ │ ├── BatchAwareBackPressureHandler.java │ │ ├── BatchVisibility.java │ │ ├── ConfigurableContainerComponent.java │ │ ├── ContainerComponentFactory.java │ │ ├── ContainerOptions.java │ │ ├── ContainerOptionsBuilder.java │ │ ├── DefaultListenerContainerRegistry.java │ │ ├── FifoBatchGroupingStrategy.java │ │ ├── FifoSqsComponentFactory.java │ │ ├── IdentifiableContainerComponent.java │ │ ├── ListenerExecutionFailedException.java │ │ ├── ListenerMode.java │ │ ├── MessageListener.java │ │ ├── MessageListenerContainer.java │ │ ├── MessageListenerContainerRegistry.java │ │ ├── MessageProcessingContext.java │ │ ├── ObservableComponent.java │ │ ├── QueueAttributes.java │ │ ├── QueueAttributesAware.java │ │ ├── QueueMessageBatchVisibility.java │ │ ├── QueueMessageVisibility.java │ │ ├── QueueNotFoundStrategy.java │ │ ├── SemaphoreBackPressureHandler.java │ │ ├── SqsAsyncClientAware.java │ │ ├── SqsContainerOptions.java │ │ ├── SqsContainerOptionsBuilder.java │ │ ├── SqsHeaders.java │ │ ├── SqsMessageListenerContainer.java │ │ ├── StandardSqsComponentFactory.java │ │ ├── TaskExecutorAware.java │ │ ├── Visibility.java │ │ ├── acknowledgement │ │ │ ├── AbstractOrderingAcknowledgementProcessor.java │ │ │ ├── Acknowledgement.java │ │ │ ├── AcknowledgementCallback.java │ │ │ ├── AcknowledgementExecutor.java │ │ │ ├── AcknowledgementOrdering.java │ │ │ ├── AcknowledgementProcessor.java │ │ │ ├── AcknowledgementResultCallback.java │ │ │ ├── AcknowledgementResultCallbackException.java │ │ │ ├── AsyncAcknowledgementResultCallback.java │ │ │ ├── BatchAcknowledgement.java │ │ │ ├── BatchingAcknowledgementProcessor.java │ │ │ ├── ExecutingAcknowledgementProcessor.java │ │ │ ├── ImmediateAcknowledgementProcessor.java │ │ │ ├── SqsAcknowledgementExecutor.java │ │ │ ├── handler │ │ │ │ ├── AcknowledgementHandler.java │ │ │ │ ├── AcknowledgementMode.java │ │ │ │ ├── AlwaysAcknowledgementHandler.java │ │ │ │ ├── NeverAcknowledgementHandler.java │ │ │ │ ├── OnSuccessAcknowledgementHandler.java │ │ │ │ └── package-info.java │ │ │ └── package-info.java │ │ ├── adapter │ │ │ ├── AbstractMethodInvokingListenerAdapter.java │ │ │ ├── AsyncMessagingMessageListenerAdapter.java │ │ │ ├── MessagingMessageListenerAdapter.java │ │ │ └── package-info.java │ │ ├── errorhandler │ │ │ ├── AsyncErrorHandler.java │ │ │ ├── ErrorHandler.java │ │ │ ├── ErrorHandlerVisibilityHelper.java │ │ │ ├── ExponentialBackoffErrorHandler.java │ │ │ ├── ImmediateRetryAsyncErrorHandler.java │ │ │ └── package-info.java │ │ ├── interceptor │ │ │ ├── AsyncMessageInterceptor.java │ │ │ ├── MessageInterceptor.java │ │ │ └── package-info.java │ │ ├── package-info.java │ │ ├── pipeline │ │ │ ├── AbstractAfterProcessingInterceptorExecutionStage.java │ │ │ ├── AbstractBeforeProcessingInterceptorExecutionStage.java │ │ │ ├── AcknowledgementHandlerExecutionStage.java │ │ │ ├── AfterProcessingContextInterceptorExecutionStage.java │ │ │ ├── AfterProcessingInterceptorExecutionStage.java │ │ │ ├── BeforeProcessingContextInterceptorExecutionStage.java │ │ │ ├── BeforeProcessingInterceptorExecutionStage.java │ │ │ ├── ErrorHandlerExecutionStage.java │ │ │ ├── MessageListenerExecutionStage.java │ │ │ ├── MessageProcessingConfiguration.java │ │ │ ├── MessageProcessingPipeline.java │ │ │ ├── MessageProcessingPipelineBuilder.java │ │ │ └── package-info.java │ │ ├── sink │ │ │ ├── AbstractMessageProcessingPipelineSink.java │ │ │ ├── BatchMessageSink.java │ │ │ ├── FanOutMessageSink.java │ │ │ ├── MessageProcessingPipelineSink.java │ │ │ ├── MessageSink.java │ │ │ ├── OrderedMessageSink.java │ │ │ ├── adapter │ │ │ │ ├── AbstractDelegatingMessageListeningSinkAdapter.java │ │ │ │ ├── MessageGroupingSinkAdapter.java │ │ │ │ ├── MessageVisibilityExtendingSinkAdapter.java │ │ │ │ └── package-info.java │ │ │ └── package-info.java │ │ └── source │ │ │ ├── AbstractMessageConvertingMessageSource.java │ │ │ ├── AbstractPollingMessageSource.java │ │ │ ├── AbstractSqsMessageSource.java │ │ │ ├── AcknowledgementProcessingMessageSource.java │ │ │ ├── FifoSqsMessageSource.java │ │ │ ├── MessageSource.java │ │ │ ├── PollingMessageSource.java │ │ │ ├── StandardSqsMessageSource.java │ │ │ └── package-info.java │ │ ├── operations │ │ ├── AbstractMessagingTemplate.java │ │ ├── AsyncMessagingOperations.java │ │ ├── MessagingOperationFailedException.java │ │ ├── MessagingOperations.java │ │ ├── MessagingTemplateOptions.java │ │ ├── SendBatchFailureHandlingStrategy.java │ │ ├── SendBatchOperationFailedException.java │ │ ├── SendResult.java │ │ ├── SqsAsyncOperations.java │ │ ├── SqsOperations.java │ │ ├── SqsReceiveOptions.java │ │ ├── SqsSendOptions.java │ │ ├── SqsTemplate.java │ │ ├── SqsTemplateBuilder.java │ │ ├── SqsTemplateOptions.java │ │ ├── SqsTemplateParameters.java │ │ ├── TemplateAcknowledgementMode.java │ │ ├── TemplateContentBasedDeduplication.java │ │ └── package-info.java │ │ ├── package-info.java │ │ └── support │ │ ├── converter │ │ ├── AbstractMessagingMessageConverter.java │ │ ├── AcknowledgementAwareMessageConversionContext.java │ │ ├── ContextAwareHeaderMapper.java │ │ ├── ContextAwareMessagingMessageConverter.java │ │ ├── HeaderMapper.java │ │ ├── MessageAttributeDataTypes.java │ │ ├── MessageConversionContext.java │ │ ├── MessagingMessageConverter.java │ │ ├── MessagingMessageHeaders.java │ │ ├── SimpleClassMatchingMessageConverter.java │ │ ├── SnsJsonNode.java │ │ ├── SnsMessageConverter.java │ │ ├── SnsSubjectConverter.java │ │ ├── SqsHeaderMapper.java │ │ ├── SqsMessageConversionContext.java │ │ ├── SqsMessagingMessageConverter.java │ │ └── package-info.java │ │ ├── observation │ │ ├── AbstractListenerObservation.java │ │ ├── AbstractTemplateObservation.java │ │ ├── MessageHeaderContextAccessor.java │ │ ├── SqsListenerObservation.java │ │ └── SqsTemplateObservation.java │ │ ├── package-info.java │ │ └── resolver │ │ ├── AcknowledgmentHandlerMethodArgumentResolver.java │ │ ├── BatchAcknowledgmentArgumentResolver.java │ │ ├── BatchPayloadMethodArgumentResolver.java │ │ ├── BatchVisibilityHandlerMethodArgumentResolver.java │ │ ├── NotificationMessageArgumentResolver.java │ │ ├── NotificationSubjectArgumentResolver.java │ │ ├── QueueAttributesMethodArgumentResolver.java │ │ ├── SqsMessageMethodArgumentResolver.java │ │ ├── VisibilityHandlerMethodArgumentResolver.java │ │ └── package-info.java │ └── test │ ├── java │ └── io │ │ └── awspring │ │ └── cloud │ │ └── sqs │ │ ├── ExceptionUtilsTest.java │ │ ├── MessageHeaderUtilsTest.java │ │ ├── annotation │ │ ├── SqsListenerAcknowledgementModeTests.java │ │ └── SqsListenerAnnotationBeanPostProcessorTests.java │ │ ├── config │ │ ├── AbstractMessageListenerContainerFactoryTests.java │ │ └── SqsMessageListenerContainerFactoryTests.java │ │ ├── integration │ │ ├── BaseSqsIntegrationTest.java │ │ ├── QueueAttributesResolverIntegrationTests.java │ │ ├── SqsAnnotationAcknowledgementIntegrationTests.java │ │ ├── SqsErrorHandlerIntegrationTests.java │ │ ├── SqsFifoIntegrationTests.java │ │ ├── SqsIntegrationTests.java │ │ ├── SqsInterceptorIntegrationTests.java │ │ ├── SqsLoadIntegrationTests.java │ │ ├── SqsMessageConversionIntegrationTests.java │ │ ├── SqsObservationIntegrationTest.java │ │ └── SqsTemplateIntegrationTests.java │ │ ├── listener │ │ ├── AbstractMessageListenerContainerTests.java │ │ ├── AsyncComponentAdaptersTests.java │ │ ├── ContainerOptionsTests.java │ │ ├── DefaultListenerContainerRegistryTests.java │ │ ├── FifoSqsComponentFactoryTests.java │ │ ├── ListenerExecutionFailedExceptionTests.java │ │ ├── SqsMessageListenerContainerTests.java │ │ ├── StandardSqsComponentFactoryTests.java │ │ ├── acknowledgement │ │ │ ├── BatchingAcknowledgementProcessorTests.java │ │ │ ├── ImmediateAcknowledgementProcessorTests.java │ │ │ ├── SqsAcknowledgementExecutorTests.java │ │ │ └── handler │ │ │ │ ├── AbstractAcknowledgementHandlerTests.java │ │ │ │ ├── AlwaysAcknowledgementHandlerTests.java │ │ │ │ ├── NeverAcknowledgementHandlerTests.java │ │ │ │ └── OnSuccessAcknowledgementHandlerTests.java │ │ ├── adapter │ │ │ ├── AbstractMethodInvokingListenerAdapterTests.java │ │ │ ├── AsyncMessagingMessageListenerAdapterTests.java │ │ │ └── MessagingMessageListenerAdapterTests.java │ │ ├── errorhandler │ │ │ ├── AsyncErrorHandlerTests.java │ │ │ ├── ErrorHandlerTests.java │ │ │ ├── ErrorHandlerVisibilityHelperTest.java │ │ │ ├── ExponentialBackoffErrorHandlerTest.java │ │ │ └── ImmediateRetryAsyncErrorHandlerTests.java │ │ ├── interceptor │ │ │ ├── AsyncMessageInterceptorTests.java │ │ │ └── MessageInterceptorTests.java │ │ ├── pipeline │ │ │ ├── AcknowledgementHandlerExecutionStageTests.java │ │ │ ├── AfterProcessingContextInterceptorExecutionStageTests.java │ │ │ ├── AfterProcessingInterceptorExecutionStageTests.java │ │ │ ├── BeforeProcessingContextInterceptorExecutionStageTests.java │ │ │ ├── BeforeProcessingInterceptorExecutionStageTests.java │ │ │ ├── ErrorHandlerExecutionStageTests.java │ │ │ └── MessageListenerExecutionStageTests.java │ │ ├── sink │ │ │ ├── AbstractMessageProcessingPipelineSinkObservationTest.java │ │ │ ├── MessageGroupingSinkTests.java │ │ │ ├── OrderedMessageListeningSinkTests.java │ │ │ └── adapter │ │ │ │ └── AbstractDelegatingMessageListeningSinkAdapterObservationTest.java │ │ └── source │ │ │ ├── AbstractPollingMessageSourceTests.java │ │ │ ├── AbstractSqsMessageSourceTests.java │ │ │ ├── FifoSqsMessageSourceTests.java │ │ │ └── StandardSqsMessageSourceTests.java │ │ ├── operations │ │ ├── SqsTemplateObservationTest.java │ │ └── SqsTemplateTests.java │ │ └── support │ │ ├── converter │ │ ├── SqsHeaderMapperTests.java │ │ └── SqsMessagingMessageConverterTests.java │ │ ├── observation │ │ ├── AbstractTemplateObservationTest.java │ │ ├── MessageHeaderContextAccessorTest.java │ │ └── SqsListenerObservationTest.java │ │ └── resolver │ │ └── BatchAcknowledgmentArgumentResolverTests.java │ └── resources │ ├── junit-platform.properties │ ├── logback.xml │ └── notificationMessage.json ├── spring-cloud-aws-starters ├── spring-cloud-aws-starter-dynamodb │ └── pom.xml ├── spring-cloud-aws-starter-imds │ └── pom.xml ├── spring-cloud-aws-starter-metrics │ └── pom.xml ├── spring-cloud-aws-starter-parameter-store │ └── pom.xml ├── spring-cloud-aws-starter-s3 │ └── pom.xml ├── spring-cloud-aws-starter-secrets-manager │ └── pom.xml ├── spring-cloud-aws-starter-ses │ └── pom.xml ├── spring-cloud-aws-starter-sns │ └── pom.xml ├── spring-cloud-aws-starter-sqs │ └── pom.xml └── spring-cloud-aws-starter │ └── pom.xml ├── spring-cloud-aws-test ├── pom.xml └── src │ ├── main │ ├── java │ │ └── io │ │ │ └── awspring │ │ │ └── cloud │ │ │ └── test │ │ │ └── sqs │ │ │ ├── AutoConfigureSqs.java │ │ │ ├── SqsTest.java │ │ │ ├── SqsTestContextBootstrapper.java │ │ │ └── SqsTypeExcludeFilter.java │ └── resources │ │ └── META-INF │ │ └── spring │ │ └── io.awspring.cloud.test.sqs.AutoConfigureSqs.imports │ └── test │ ├── java │ └── io │ │ └── awspring │ │ └── cloud │ │ └── test │ │ └── sqs │ │ ├── BaseSqsIntegrationTest.java │ │ ├── SampleComponent.java │ │ ├── SqsSampleListener.java │ │ ├── SqsTestApplication.java │ │ ├── SqsTestListenersDefinedTest.java │ │ └── SqsTestNoListenersDefinedTest.java │ └── resources │ └── logback-test.xml └── spring-cloud-aws-testcontainers ├── pom.xml └── src ├── main ├── java │ └── io │ │ └── awspring │ │ └── cloud │ │ └── testcontainers │ │ ├── AwsClientFactory.java │ │ ├── AwsContainerConnectionDetailsFactory.java │ │ └── LocalstackAwsClientFactory.java └── resources │ └── META-INF │ └── spring.factories └── test ├── java └── io │ └── awspring │ └── cloud │ └── testcontainers │ ├── AwsContainerConnectionDetailsFactoryTest.java │ └── LocalstackAwsClientFactoryTest.java └── resources └── logback.xml /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: https://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | [*] 7 | indent_style = tab 8 | indent_size = 4 9 | end_of_line = lf 10 | insert_final_newline = true 11 | 12 | [*.yml] 13 | indent_style = space 14 | indent_size = 2 15 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @maciejwalkowiak @MatejNedic @tomazfernandes 2 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: awspring 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 21 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Type**: Bug 11 | 12 | **Component**: 13 | 14 | 15 | **Describe the bug** 16 | Please provide details of the problem, including the version of Spring Cloud that you 17 | are using. 18 | 19 | **Sample** 20 | If possible, please provide a test case or sample application that reproduces 21 | the problem. This makes it much easier for us to diagnose the problem and to verify that 22 | we have fixed it. 23 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Type**: Feature 11 | 12 | **Is your feature request related to a problem? Please describe.** 13 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 14 | 15 | **Describe the solution you'd like** 16 | A clear and concise description of what you want to happen. 17 | 18 | **Describe alternatives you've considered** 19 | A clear and concise description of any alternative solutions or features you've considered. 20 | 21 | **Additional context** 22 | Add any other context or screenshots about the feature request here. 23 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | 3 | updates: 4 | - package-ecosystem: github-actions 5 | directory: / 6 | schedule: 7 | interval: weekly 8 | open-pull-requests-limit: 10 9 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | ## :loudspeaker: Type of change 2 | 3 | - [ ] Bugfix 4 | - [ ] New feature 5 | - [ ] Enhancement 6 | - [ ] Refactoring 7 | 8 | 9 | ## :scroll: Description 10 | 11 | 12 | 13 | ## :bulb: Motivation and Context 14 | 15 | 16 | 17 | 18 | ## :green_heart: How did you test it? 19 | 20 | 21 | ## :pencil: Checklist 22 | 23 | - [ ] I reviewed submitted code 24 | - [ ] I added tests to verify changes 25 | - [ ] I updated reference documentation to reflect the change 26 | - [ ] All tests passing 27 | - [ ] No breaking changes 28 | 29 | 30 | ## :crystal_ball: Next steps 31 | -------------------------------------------------------------------------------- /.github/triage-rules.yml: -------------------------------------------------------------------------------- 1 | rules: 2 | 3 | - valueFor: '**Component**' 4 | contains: 'CloudWatch' 5 | addLabels: ['component: cloudwatch'] 6 | - valueFor: '**Component**' 7 | contains: 'ElastiCache' 8 | addLabels: ['component: elasticache'] 9 | - valueFor: '**Component**' 10 | contains: 'Parameter Store' 11 | addLabels: ['component: parameter-store'] 12 | - valueFor: '**Component**' 13 | contains: 'RDS' 14 | addLabels: ['component: rds'] 15 | - valueFor: '**Component**' 16 | contains: 'S3' 17 | addLabels: ['component: s3'] 18 | - valueFor: '**Component**' 19 | contains: 'Secrets Manager' 20 | addLabels: ['component: secrets-manager'] 21 | - valueFor: '**Component**' 22 | contains: 'SES' 23 | addLabels: ['component: ses'] 24 | - valueFor: '**Component**' 25 | contains: 'SNS' 26 | addLabels: ['component: sns'] 27 | - valueFor: '**Component**' 28 | contains: 'SQS' 29 | addLabels: ['component: sqs'] 30 | 31 | - valueFor: '**Type**' 32 | contains: Feature 33 | addLabels: ['type: enhancement'] 34 | - valueFor: '**Type**' 35 | contains: Bug 36 | addLabels: ['type: bug'] 37 | -------------------------------------------------------------------------------- /.github/workflows/issue-triager.yml: -------------------------------------------------------------------------------- 1 | name: Issue triager 2 | on: 3 | issues: 4 | types: [opened] 5 | 6 | permissions: 7 | contents: read 8 | 9 | jobs: 10 | label: 11 | 12 | runs-on: ubuntu-latest 13 | 14 | steps: 15 | - uses: actions/checkout@v4 16 | 17 | - uses: damccorm/tag-ur-it@master 18 | with: 19 | repo-token: "${{ secrets.GITHUB_TOKEN }}" 20 | configuration-path: "./.github/triage-rules.yml" 21 | 22 | - if: always() 23 | uses: actions/github-script@v7 24 | with: 25 | github-token: ${{secrets.GITHUB_TOKEN}} 26 | script: | 27 | github.issues.addLabels({ 28 | issue_number: context.issue.number, 29 | owner: context.repo.owner, 30 | repo: context.repo.repo, 31 | labels: ['status: waiting-for-triage'] 32 | }) 33 | -------------------------------------------------------------------------------- /.github/workflows/labeler.yml: -------------------------------------------------------------------------------- 1 | name: "Pull Request Labeler" 2 | on: 3 | - pull_request_target 4 | 5 | permissions: 6 | contents: read 7 | 8 | jobs: 9 | triage: 10 | permissions: 11 | contents: read # for actions/labeler to determine modified files 12 | pull-requests: write # for actions/labeler to add labels to PRs 13 | runs-on: ubuntu-latest 14 | steps: 15 | - uses: actions/labeler@v5 16 | with: 17 | repo-token: ${{ secrets.GITHUB_TOKEN }} 18 | sync-labels: true 19 | -------------------------------------------------------------------------------- /.github/workflows/upload-docs.yml: -------------------------------------------------------------------------------- 1 | name: Build and upload docs 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | - 3.1.x 8 | - 3.2.x 9 | - 3.3.x 10 | - 3.0.x 11 | - 2.4.x 12 | - 2.3.x 13 | - 2.2.x 14 | 15 | env: 16 | # https://github.com/actions/checkout/issues/440#issuecomment-854240996 17 | AWS_EC2_METADATA_DISABLED: true 18 | 19 | permissions: 20 | contents: read 21 | 22 | jobs: 23 | build: 24 | runs-on: ubuntu-22.04 25 | 26 | steps: 27 | - uses: actions/checkout@v4 28 | - name: Set up JDK 17 29 | uses: actions/setup-java@v4 30 | with: 31 | distribution: temurin 32 | java-version: 17.0.12 33 | cache: maven 34 | - name: Build docs 35 | run: ./mvnw clean package javadoc:aggregate -Pdocs-classic,spring -DskipTests=true -e 36 | - name: Upload to S3 37 | env: 38 | AWS_ACCESS_KEY_ID: ${{ secrets.S3_AWS_ACCESS_KEY }} 39 | AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_AWS_SECRET_KEY }} 40 | run: | 41 | aws s3 sync --acl public-read docs/target/generated-docs/ s3://awspring-docs/spring-cloud-aws/docs/ 42 | aws s3 sync --acl public-read target/site/ s3://awspring-docs/spring-cloud-aws/docs/ 43 | aws cloudfront create-invalidation --distribution-id EA7LER7CI960A --paths "/*" 44 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore folders 2 | target/ 3 | /config 4 | /.idea 5 | /out 6 | 7 | # Do not ignore them 8 | !.idea/copyright 9 | !.idea/inspectionProfiles 10 | !.idea/scopes 11 | !.idea/codeStyleSettings.xml 12 | !.idea/vcs.xml 13 | 14 | # Ignore files 15 | access.properties 16 | mail.properties 17 | *.iml 18 | *.ipr 19 | *.iws 20 | .project 21 | .classpath 22 | .settings/ 23 | 24 | .vscode/ 25 | 26 | # Because re-configuring the directory in the share plugin leads to side effect we ignore the file 27 | dependency-reduced-pom.xml 28 | .factorypath 29 | *.versionsBackup 30 | 31 | .sdkmanrc 32 | -------------------------------------------------------------------------------- /.gitpod.yml: -------------------------------------------------------------------------------- 1 | tasks: 2 | - before: sdk install mvnd 3 | init: mvnd verify spotless:apply -DskipTests=true 4 | 5 | vscode: 6 | extensions: 7 | - Pivotal.vscode-boot-dev-pack 8 | - vscjava.vscode-java-pack 9 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /.mvn/jvm.config: -------------------------------------------------------------------------------- 1 | -Xmx1024m -XX:CICompilerCount=1 -XX:TieredStopAtLevel=1 -Djava.security.egd=file:/dev/./urandom 2 | -------------------------------------------------------------------------------- /.mvn/maven.config: -------------------------------------------------------------------------------- 1 | -DaltSnapshotDeploymentRepository=repo.spring.io::default::https://repo.spring.io/libs-snapshot-local -P spring 2 | -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awspring/spring-cloud-aws/cf949b76e88557a0a5c1a03943be4bb6b2014423/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.3/apache-maven-3.8.3-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar 3 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: format build docs 2 | 3 | format: 4 | mvnd spotless:apply 5 | 6 | build: 7 | mvnd verify spotless:apply 8 | 9 | clean: 10 | mvnd clean 11 | 12 | docs: 13 | mvnd verify -Pdocs-classic -DskipTests=true 14 | 15 | docs-full: 16 | mvnd verify javadoc:aggregate -Pdocs-classic -DskipTests=true 17 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Reporting a Vulnerability 4 | 5 | To report security vulnerabilities, please send email to awspringio@gmail.com. 6 | -------------------------------------------------------------------------------- /docs/src/main/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awspring/spring-cloud-aws/cf949b76e88557a0a5c1a03943be4bb6b2014423/docs/src/main/.DS_Store -------------------------------------------------------------------------------- /docs/src/main/asciidoc/_attributes.adoc: -------------------------------------------------------------------------------- 1 | :doctype: book 2 | :idprefix: 3 | :idseparator: - 4 | :toc: left 5 | :toclevels: 4 6 | :tabsize: 4 7 | :numbered: 8 | :sectanchors: 9 | :sectnums: 10 | :icons: font 11 | :hide-uri-scheme: 12 | :docinfo: shared,private 13 | 14 | :sc-ext: java 15 | :project-full-name: Spring Cloud AWS 16 | :all: {asterisk}{asterisk} 17 | -------------------------------------------------------------------------------- /docs/src/main/asciidoc/appendix.adoc: -------------------------------------------------------------------------------- 1 | :numbered!: 2 | :index-link: index.html 3 | 4 | [appendix] 5 | [[common-application-properties]] 6 | == Common application properties 7 | 8 | include::_attributes.adoc[] 9 | 10 | Various properties can be specified inside your `application.properties` file, inside your `application.yml` file, or as command line switches. 11 | This appendix provides a list of common {project-full-name} properties and references to the underlying classes that consume them. 12 | 13 | NOTE: Property contributions can come from additional jar files on your classpath, so you should not consider this an exhaustive list. 14 | Also, you can define your own properties. 15 | 16 | include::_configprops.adoc[] 17 | -------------------------------------------------------------------------------- /docs/src/main/asciidoc/contributing.adoc: -------------------------------------------------------------------------------- 1 | NOTE: Spring Cloud AWS is released under the non-restrictive Apache 2.0 license. If you would like to contribute to this section of the documentation or if you find an error, please find the source code and issue trackers in the project at https://github.com/awspring/spring-cloud-aws[github]. 2 | -------------------------------------------------------------------------------- /docs/src/main/asciidoc/docker-compose.adoc: -------------------------------------------------------------------------------- 1 | [#spring-cloud-aws-docker-compose] 2 | == Docker Compose 3 | 4 | Spring Cloud AWS provides Docker Compose support for https://docs.localstack.cloud/references/docker-images/[LocalStack docker images] which simplifies local development of Spring Cloud AWS based projects. 5 | 6 | Maven coordinates, using <>: 7 | 8 | [source,xml] 9 | ---- 10 | 11 | io.awspring.cloud 12 | spring-cloud-aws-docker-compose 13 | 14 | ---- 15 | 16 | For more information about Spring Docker Compose support please refer to https://docs.spring.io/spring-boot/reference/features/dev-services.html#features.dev-services.docker-compose[official Spring documentation] 17 | 18 | === Example docker-compose.yaml file 19 | 20 | [source,yaml] 21 | ---- 22 | services: 23 | localstack: 24 | image: localstack/localstack 25 | environment: 26 | AWS_ACCESS_KEY_ID: noop 27 | AWS_SECRET_ACCESS_KEY: noop 28 | AWS_DEFAULT_REGION: eu-central-1 29 | ports: 30 | - "4566:4566" 31 | ---- 32 | 33 | `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY` and `AWS_DEFAULT_REGION` are required environment variables to ensure proper integration. 34 | 35 | -------------------------------------------------------------------------------- /docs/src/main/asciidoc/intro.adoc: -------------------------------------------------------------------------------- 1 | Spring Cloud AWS simplifies using AWS managed services in a Spring and Spring Boot applications. It offers a convenient way to interact with AWS provided services using well-known Spring idioms and APIs. 2 | -------------------------------------------------------------------------------- /docs/src/main/asciidoc/spring-cloud-aws.adoc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awspring/spring-cloud-aws/cf949b76e88557a0a5c1a03943be4bb6b2014423/docs/src/main/asciidoc/spring-cloud-aws.adoc -------------------------------------------------------------------------------- /docs/src/main/asciidoc/spring-modulith.adoc: -------------------------------------------------------------------------------- 1 | [#spring-cloud-aws-modulith] 2 | == Spring Modulith Integration 3 | 4 | Spring Cloud AWS comes with externalized events 5 | 6 | Integration with https://spring.io/projects/spring-modulith[Spring Modulith] provides capability to send externalized events to SNS and SQS. Read more about externalizing events in https://docs.spring.io/spring-modulith/reference/events.html#externalization[Spring Modulith Reference Guide]. 7 | 8 | === SNS 9 | 10 | Maven coordinates, using <>: 11 | 12 | [source,xml] 13 | ---- 14 | 15 | io.awspring.cloud 16 | spring-cloud-aws-modulith-events-sns 17 | 18 | ---- 19 | 20 | The logical routing key will be used as SNS message group id. When routing key is set, requires SNS to be configured as a FIFO topic with content based deduplication enabled. 21 | 22 | === SQS 23 | 24 | Maven coordinates, using <>: 25 | 26 | [source,xml] 27 | ---- 28 | 29 | io.awspring.cloud 30 | spring-cloud-aws-modulith-events-sqs 31 | 32 | ---- 33 | 34 | The logical routing key will be used as SQS message group id. When routing key is set, requires SQS queue to be configured as a FIFO queue. 35 | -------------------------------------------------------------------------------- /license-header.txt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-$YEAR the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/main/java/io/awspring/cloud/autoconfigure/AwsAsyncClientCustomizer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2024 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.autoconfigure; 17 | 18 | import software.amazon.awssdk.awscore.client.builder.AwsAsyncClientBuilder; 19 | 20 | /** 21 | * Callback interface that can be used to customize a {@link AwsAsyncClientBuilder}. 22 | *

23 | * It gets applied to every configured asynchronous AWS client bean. 24 | * 25 | * @author Maciej Walkowiak 26 | * @since 3.3.0 27 | */ 28 | public interface AwsAsyncClientCustomizer { 29 | /** 30 | * Callback to customize a {@link AwsAsyncClientBuilder} instance. 31 | * 32 | * @param builder the client builder to customize 33 | */ 34 | void customize(AwsAsyncClientBuilder builder); 35 | } 36 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/main/java/io/awspring/cloud/autoconfigure/AwsClientCustomizer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2024 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.autoconfigure; 17 | 18 | import software.amazon.awssdk.awscore.client.builder.AwsClientBuilder; 19 | 20 | /** 21 | * Base callback interface to be extended by customizers for specific AWS clients. 22 | * 23 | * @param - type of AWS client builder to customize 24 | * @author Maciej Walkowiak 25 | * @since 3.3.0 26 | */ 27 | public interface AwsClientCustomizer> { 28 | 29 | /** 30 | * Callback to customize an instance of AWS client builder. 31 | * 32 | * @param builder the client builder to customize 33 | */ 34 | void customize(T builder); 35 | } 36 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/main/java/io/awspring/cloud/autoconfigure/AwsSyncClientCustomizer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2024 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.autoconfigure; 17 | 18 | import software.amazon.awssdk.awscore.client.builder.AwsSyncClientBuilder; 19 | 20 | /** 21 | * Callback interface that can be used to customize a {@link AwsSyncClientBuilder}. 22 | *

23 | * It gets applied to every configured synchronous AWS client bean. 24 | * 25 | * @author Maciej Walkowiak 26 | * @since 3.3.0 27 | */ 28 | public interface AwsSyncClientCustomizer { 29 | /** 30 | * Callback to customize a {@link AwsSyncClientBuilder} instance. 31 | * 32 | * @param builder the client builder to customize 33 | */ 34 | void customize(AwsSyncClientBuilder builder); 35 | } 36 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/main/java/io/awspring/cloud/autoconfigure/config/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * {@link org.springframework.boot.context.config.ConfigDataLoader} implementations for AWS services. 19 | */ 20 | @org.springframework.lang.NonNullApi 21 | @org.springframework.lang.NonNullFields 22 | package io.awspring.cloud.autoconfigure.config; 23 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/main/java/io/awspring/cloud/autoconfigure/config/parameterstore/AwsParameterStoreClientCustomizer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.autoconfigure.config.parameterstore; 17 | 18 | import io.awspring.cloud.autoconfigure.core.AwsClientCustomizer; 19 | import software.amazon.awssdk.services.ssm.SsmClientBuilder; 20 | 21 | /** 22 | * @deprecated use {@link SsmClientCustomizer} 23 | * @author Matej Nedic 24 | * @since 3.0.0 25 | */ 26 | @Deprecated(since = "3.3.0", forRemoval = true) 27 | public interface AwsParameterStoreClientCustomizer extends AwsClientCustomizer { 28 | } 29 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/main/java/io/awspring/cloud/autoconfigure/config/parameterstore/ParameterStoreKeysMissingException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.autoconfigure.config.parameterstore; 17 | 18 | /** 19 | * Thrown when configuration provided to ConfigDataLoader is missing parameter store keys, for example 20 | * `spring.config.import=aws-parameterstore:`. 21 | * 22 | * @author Maciej Walkowiak 23 | * @since 3.0.0 24 | */ 25 | public class ParameterStoreKeysMissingException extends RuntimeException { 26 | 27 | ParameterStoreKeysMissingException(String message) { 28 | super(message); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/main/java/io/awspring/cloud/autoconfigure/config/parameterstore/SsmClientCustomizer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.autoconfigure.config.parameterstore; 17 | 18 | import io.awspring.cloud.autoconfigure.AwsClientCustomizer; 19 | import software.amazon.awssdk.services.ssm.SsmClientBuilder; 20 | 21 | /** 22 | * Callback interface that can be used to customize a {@link SsmClientBuilder}. 23 | * 24 | * @author Maciej Walkowiak 25 | * @since 3.3.0 26 | */ 27 | @FunctionalInterface 28 | public interface SsmClientCustomizer extends AwsClientCustomizer { 29 | } 30 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/main/java/io/awspring/cloud/autoconfigure/config/parameterstore/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * {@link org.springframework.boot.context.config.ConfigDataLoader} implementation for AWS Parameter Store. 19 | */ 20 | @org.springframework.lang.NonNullApi 21 | @org.springframework.lang.NonNullFields 22 | package io.awspring.cloud.autoconfigure.config.parameterstore; 23 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/main/java/io/awspring/cloud/autoconfigure/config/reload/ReloadStrategy.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.autoconfigure.config.reload; 17 | 18 | /** 19 | * Configuration for reload strategies. 20 | * 21 | * Heavily inspired by Spring Cloud Kubernetes. 22 | * 23 | * @author Nicola Ferraro 24 | * @author Matej Nedic 25 | * @author Maciej Walkowiak 26 | */ 27 | public enum ReloadStrategy { 28 | /** 29 | * Fire a refresh of beans annotated with @ConfigurationProperties or @RefreshScope. 30 | */ 31 | REFRESH, 32 | 33 | /** 34 | * Restarts the Spring ApplicationContext to apply the new configuration. 35 | */ 36 | RESTART_CONTEXT 37 | } 38 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/main/java/io/awspring/cloud/autoconfigure/config/reload/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Common classes used for reloading configuration properties. 19 | */ 20 | @org.springframework.lang.NonNullApi 21 | @org.springframework.lang.NonNullFields 22 | package io.awspring.cloud.autoconfigure.config.reload; 23 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/main/java/io/awspring/cloud/autoconfigure/config/s3/S3KeysMissingException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.autoconfigure.config.s3; 17 | 18 | /** 19 | * Thrown when configuration provided to ConfigDataLoader is missing S3 keys, for example 20 | * `spring.config.import=aws-s3:`. 21 | * 22 | * @author Kunal Varpe 23 | * @since 3.3.0 24 | */ 25 | public class S3KeysMissingException extends RuntimeException { 26 | 27 | public S3KeysMissingException(String message) { 28 | super(message); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/main/java/io/awspring/cloud/autoconfigure/config/s3/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * {@link org.springframework.boot.context.config.ConfigDataLoader} implementation for AWS S3. 19 | */ 20 | @org.springframework.lang.NonNullApi 21 | @org.springframework.lang.NonNullFields 22 | package io.awspring.cloud.autoconfigure.config.s3; 23 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/main/java/io/awspring/cloud/autoconfigure/config/secretsmanager/AwsSecretsManagerClientCustomizer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.autoconfigure.config.secretsmanager; 17 | 18 | import io.awspring.cloud.autoconfigure.core.AwsClientCustomizer; 19 | import software.amazon.awssdk.services.secretsmanager.SecretsManagerClientBuilder; 20 | 21 | /** 22 | * @deprecated use {@link SecretsManagerClientCustomizer} 23 | * @author Matej Nedic 24 | * @since 3.0.0 25 | */ 26 | @Deprecated(since = "3.3.0", forRemoval = true) 27 | public interface AwsSecretsManagerClientCustomizer extends AwsClientCustomizer { 28 | } 29 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/main/java/io/awspring/cloud/autoconfigure/config/secretsmanager/SecretsManagerClientCustomizer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.autoconfigure.config.secretsmanager; 17 | 18 | import io.awspring.cloud.autoconfigure.AwsClientCustomizer; 19 | import software.amazon.awssdk.services.secretsmanager.SecretsManagerClientBuilder; 20 | 21 | /** 22 | * Callback interface that can be used to customize a {@link SecretsManagerClientBuilder}. 23 | * 24 | * @author Maciej Walkowiak 25 | * @since 3.3.0 26 | */ 27 | @FunctionalInterface 28 | public interface SecretsManagerClientCustomizer extends AwsClientCustomizer { 29 | } 30 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/main/java/io/awspring/cloud/autoconfigure/config/secretsmanager/SecretsManagerKeysMissingException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.autoconfigure.config.secretsmanager; 17 | 18 | /** 19 | * Thrown when configuration provided to ConfigDataLoader is missing Secrets Manager keys, for example 20 | * `spring.config.import=aws-secretsmanager:`. 21 | * 22 | * @author Maciej Walkowiak 23 | * @since 3.0.0 24 | */ 25 | public class SecretsManagerKeysMissingException extends RuntimeException { 26 | 27 | public SecretsManagerKeysMissingException(String message) { 28 | super(message); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/main/java/io/awspring/cloud/autoconfigure/config/secretsmanager/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * {@link org.springframework.boot.context.config.ConfigDataLoader} implementation for AWS Secrets Manager. 19 | */ 20 | @org.springframework.lang.NonNullApi 21 | @org.springframework.lang.NonNullFields 22 | package io.awspring.cloud.autoconfigure.config.secretsmanager; 23 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/main/java/io/awspring/cloud/autoconfigure/core/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Auto-configurations for core Spring Cloud AWS components - 19 | * {@link software.amazon.awssdk.auth.credentials.AwsCredentialsProvider} and 20 | * {@link software.amazon.awssdk.regions.providers.AwsRegionProvider}. 21 | */ 22 | @org.springframework.lang.NonNullApi 23 | @org.springframework.lang.NonNullFields 24 | package io.awspring.cloud.autoconfigure.core; 25 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/main/java/io/awspring/cloud/autoconfigure/dynamodb/DynamoDbClientCustomizer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.autoconfigure.dynamodb; 17 | 18 | import io.awspring.cloud.autoconfigure.AwsClientCustomizer; 19 | import software.amazon.awssdk.services.dynamodb.DynamoDbClientBuilder; 20 | 21 | /** 22 | * Callback interface that can be used to customize a {@link DynamoDbClientBuilder}. 23 | * 24 | * @author Maciej Walkowiak 25 | * @since 3.3.0 26 | */ 27 | @FunctionalInterface 28 | public interface DynamoDbClientCustomizer extends AwsClientCustomizer { 29 | } 30 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/main/java/io/awspring/cloud/autoconfigure/dynamodb/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Auto-configuration for DynamoDB integration. 19 | */ 20 | @org.springframework.lang.NonNullApi 21 | @org.springframework.lang.NonNullFields 22 | package io.awspring.cloud.autoconfigure.dynamodb; 23 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/main/java/io/awspring/cloud/autoconfigure/imds/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Auto-configuration for IMDS (EC2 Instance MetaData Service) integration. 19 | */ 20 | @org.springframework.lang.NonNullApi 21 | @org.springframework.lang.NonNullFields 22 | package io.awspring.cloud.autoconfigure.imds; 23 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/main/java/io/awspring/cloud/autoconfigure/metrics/CloudWatchAsyncClientCustomizer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.autoconfigure.metrics; 17 | 18 | import io.awspring.cloud.autoconfigure.AwsClientCustomizer; 19 | import software.amazon.awssdk.services.cloudwatch.CloudWatchAsyncClientBuilder; 20 | 21 | /** 22 | * Callback interface that can be used to customize a {@link CloudWatchAsyncClientBuilder}. 23 | * 24 | * @author Maciej Walkowiak 25 | * @since 3.3.0 26 | */ 27 | @FunctionalInterface 28 | public interface CloudWatchAsyncClientCustomizer extends AwsClientCustomizer { 29 | } 30 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/main/java/io/awspring/cloud/autoconfigure/metrics/CloudWatchProperties.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2019 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.autoconfigure.metrics; 17 | 18 | import io.awspring.cloud.autoconfigure.AwsClientProperties; 19 | import org.springframework.boot.context.properties.ConfigurationProperties; 20 | 21 | /** 22 | * {@link ConfigurationProperties} for configuring CloudWatch client. 23 | * 24 | * @author Jon Schneider 25 | * @author Dawid Kublik 26 | * @author Bernardo Martins 27 | * @author Eddú Meléndez 28 | * @since 2.0.0 29 | */ 30 | @ConfigurationProperties(prefix = "spring.cloud.aws.cloudwatch") 31 | public class CloudWatchProperties extends AwsClientProperties { 32 | } 33 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/main/java/io/awspring/cloud/autoconfigure/metrics/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Auto-configuration for CloudWatch integration. 19 | */ 20 | @org.springframework.lang.NonNullApi 21 | @org.springframework.lang.NonNullFields 22 | package io.awspring.cloud.autoconfigure.metrics; 23 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/main/java/io/awspring/cloud/autoconfigure/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Auto-configurations for AWS services integrations. 19 | */ 20 | @org.springframework.lang.NonNullApi 21 | @org.springframework.lang.NonNullFields 22 | package io.awspring.cloud.autoconfigure; 23 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/main/java/io/awspring/cloud/autoconfigure/s3/S3ClientCustomizer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.autoconfigure.s3; 17 | 18 | import io.awspring.cloud.autoconfigure.AwsClientCustomizer; 19 | import software.amazon.awssdk.services.s3.S3ClientBuilder; 20 | 21 | /** 22 | * Callback interface that can be used to customize a {@link S3ClientBuilder}. 23 | * 24 | * @author Maciej Walkowiak 25 | * @since 3.3.0 26 | */ 27 | @FunctionalInterface 28 | public interface S3ClientCustomizer extends AwsClientCustomizer { 29 | } 30 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/main/java/io/awspring/cloud/autoconfigure/s3/S3EncryptionClientCustomizer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2024 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.autoconfigure.s3; 17 | 18 | import io.awspring.cloud.autoconfigure.AwsClientCustomizer; 19 | import software.amazon.encryption.s3.S3EncryptionClient; 20 | 21 | /** 22 | * Callback interface that can be used to customize a {@link S3EncryptionClient.Builder}. 23 | * 24 | * @author Matej Nedic 25 | * @since 3.3.0 26 | */ 27 | @FunctionalInterface 28 | public interface S3EncryptionClientCustomizer extends AwsClientCustomizer { 29 | } 30 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/main/java/io/awspring/cloud/autoconfigure/s3/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Auto-configuration for S3 integrations. 19 | */ 20 | @org.springframework.lang.NonNullApi 21 | @org.springframework.lang.NonNullFields 22 | package io.awspring.cloud.autoconfigure.s3; 23 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/main/java/io/awspring/cloud/autoconfigure/s3/properties/S3PluginProperties.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2024 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.autoconfigure.s3.properties; 17 | 18 | public class S3PluginProperties { 19 | 20 | /** 21 | * If set to false if Access Grants does not find/return permissions, S3Client won't try to determine if policies 22 | * grant access If set to true fallback policies S3/IAM will be evaluated. 23 | */ 24 | private boolean enableFallback; 25 | 26 | public boolean getEnableFallback() { 27 | return enableFallback; 28 | } 29 | 30 | public void setEnableFallback(boolean enableFallback) { 31 | this.enableFallback = enableFallback; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/main/java/io/awspring/cloud/autoconfigure/s3/properties/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Properties for auto-configuration 19 | */ 20 | @org.springframework.lang.NonNullApi 21 | @org.springframework.lang.NonNullFields 22 | package io.awspring.cloud.autoconfigure.s3.properties; 23 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/main/java/io/awspring/cloud/autoconfigure/ses/SesClientCustomizer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.autoconfigure.ses; 17 | 18 | import io.awspring.cloud.autoconfigure.AwsClientCustomizer; 19 | import software.amazon.awssdk.services.ses.SesClientBuilder; 20 | 21 | /** 22 | * Callback interface that can be used to customize a {@link SesClientBuilder}. 23 | * 24 | * @author Maciej Walkowiak 25 | * @since 3.3.0 26 | */ 27 | @FunctionalInterface 28 | public interface SesClientCustomizer extends AwsClientCustomizer { 29 | } 30 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/main/java/io/awspring/cloud/autoconfigure/ses/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Auto-configuration for Amazon SES (Simple Email Service) integrations. 19 | */ 20 | @org.springframework.lang.NonNullApi 21 | @org.springframework.lang.NonNullFields 22 | package io.awspring.cloud.autoconfigure.ses; 23 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/main/java/io/awspring/cloud/autoconfigure/sns/SnsClientCustomizer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.autoconfigure.sns; 17 | 18 | import io.awspring.cloud.autoconfigure.AwsClientCustomizer; 19 | import software.amazon.awssdk.services.sns.SnsClientBuilder; 20 | 21 | /** 22 | * Callback interface that can be used to customize a {@link SnsClientBuilder}. 23 | * 24 | * @author Maciej Walkowiak 25 | * @since 3.3.0 26 | */ 27 | @FunctionalInterface 28 | public interface SnsClientCustomizer extends AwsClientCustomizer { 29 | } 30 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/main/java/io/awspring/cloud/autoconfigure/sns/SnsProperties.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.autoconfigure.sns; 17 | 18 | import io.awspring.cloud.autoconfigure.AwsClientProperties; 19 | import org.springframework.boot.context.properties.ConfigurationProperties; 20 | 21 | /** 22 | * Properties related to AWS SNS. 23 | * 24 | * @author Matej Nedic 25 | * @since 3.0 26 | */ 27 | @ConfigurationProperties(prefix = SnsProperties.PREFIX) 28 | public class SnsProperties extends AwsClientProperties { 29 | 30 | /** 31 | * The prefix used for AWS SNS configuration. 32 | */ 33 | public static final String PREFIX = "spring.cloud.aws.sns"; 34 | } 35 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/main/java/io/awspring/cloud/autoconfigure/sns/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Auto-configuration for Amazon SNS (Simple Notification Service) integrations. 19 | */ 20 | @org.springframework.lang.NonNullApi 21 | @org.springframework.lang.NonNullFields 22 | package io.awspring.cloud.autoconfigure.sns; 23 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/main/java/io/awspring/cloud/autoconfigure/sqs/SqsAsyncClientCustomizer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.autoconfigure.sqs; 17 | 18 | import io.awspring.cloud.autoconfigure.AwsClientCustomizer; 19 | import software.amazon.awssdk.services.sqs.SqsAsyncClientBuilder; 20 | 21 | /** 22 | * Callback interface that can be used to customize a {@link SqsAsyncClientBuilder}. 23 | * 24 | * @author Maciej Walkowiak 25 | * @since 3.3.0 26 | */ 27 | @FunctionalInterface 28 | public interface SqsAsyncClientCustomizer extends AwsClientCustomizer { 29 | } 30 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/main/java/io/awspring/cloud/autoconfigure/sqs/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Auto-configuration for Amazon SQS (Simple Queue Service) integrations. 19 | */ 20 | @org.springframework.lang.NonNullApi 21 | @org.springframework.lang.NonNullFields 22 | package io.awspring.cloud.autoconfigure.sqs; 23 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "properties": [ 3 | { 4 | "defaultValue": true, 5 | "name": "spring.cloud.aws.sns.enabled", 6 | "description": "Enables SNS integration.", 7 | "type": "java.lang.Boolean" 8 | }, 9 | { 10 | "defaultValue": true, 11 | "name": "spring.cloud.aws.ses.enabled", 12 | "description": "Enables Simple Email Service integration.", 13 | "type": "java.lang.Boolean" 14 | }, 15 | { 16 | "defaultValue": true, 17 | "name": "spring.cloud.aws.s3.enabled", 18 | "description": "Enables S3 integration.", 19 | "type": "java.lang.Boolean" 20 | }, 21 | { 22 | "defaultValue": true, 23 | "name": "spring.cloud.aws.dynamodb.enabled", 24 | "description": "Enables DynamoDb integration.", 25 | "type": "java.lang.Boolean" 26 | }, 27 | { 28 | "defaultValue": true, 29 | "name": "spring.cloud.aws.sqs.enabled", 30 | "description": "Enables SQS integration.", 31 | "type": "java.lang.Boolean" 32 | } 33 | ] 34 | } 35 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | # ConfigData Location Resolvers 2 | org.springframework.boot.context.config.ConfigDataLocationResolver=\ 3 | io.awspring.cloud.autoconfigure.config.parameterstore.ParameterStoreConfigDataLocationResolver,\ 4 | io.awspring.cloud.autoconfigure.config.secretsmanager.SecretsManagerConfigDataLocationResolver,\ 5 | io.awspring.cloud.autoconfigure.config.s3.S3ConfigDataLocationResolver 6 | 7 | # ConfigData Loaders 8 | org.springframework.boot.context.config.ConfigDataLoader=\ 9 | io.awspring.cloud.autoconfigure.config.parameterstore.ParameterStoreConfigDataLoader,\ 10 | io.awspring.cloud.autoconfigure.config.secretsmanager.SecretsManagerConfigDataLoader,\ 11 | io.awspring.cloud.autoconfigure.config.s3.S3ConfigDataLoader 12 | 13 | # Failure Analyzers 14 | org.springframework.boot.diagnostics.FailureAnalyzer=\ 15 | io.awspring.cloud.autoconfigure.config.parameterstore.ParameterStoreMissingKeysFailureAnalyzer, \ 16 | io.awspring.cloud.autoconfigure.config.secretsmanager.SecretsManagerMissingKeysFailureAnalyzer,\ 17 | io.awspring.cloud.autoconfigure.config.s3.S3MissingKeysFailureAnalyzer 18 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/main/resources/META-INF/spring/aot.factories: -------------------------------------------------------------------------------- 1 | org.springframework.aot.hint.RuntimeHintsRegistrar=\ 2 | io.awspring.cloud.autoconfigure.config.ConfigStoreRuntimeHints,\ 3 | io.awspring.cloud.autoconfigure.core.CoreAOT 4 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | io.awspring.cloud.autoconfigure.core.AwsAutoConfiguration 2 | io.awspring.cloud.autoconfigure.core.CredentialsProviderAutoConfiguration 3 | io.awspring.cloud.autoconfigure.core.RegionProviderAutoConfiguration 4 | io.awspring.cloud.autoconfigure.imds.ImdsAutoConfiguration 5 | io.awspring.cloud.autoconfigure.metrics.CloudWatchExportAutoConfiguration 6 | io.awspring.cloud.autoconfigure.ses.SesAutoConfiguration 7 | io.awspring.cloud.autoconfigure.s3.S3TransferManagerAutoConfiguration 8 | io.awspring.cloud.autoconfigure.s3.S3AutoConfiguration 9 | io.awspring.cloud.autoconfigure.s3.S3CrtAsyncClientAutoConfiguration 10 | io.awspring.cloud.autoconfigure.sns.SnsAutoConfiguration 11 | io.awspring.cloud.autoconfigure.sqs.SqsAutoConfiguration 12 | io.awspring.cloud.autoconfigure.dynamodb.DynamoDbAutoConfiguration 13 | io.awspring.cloud.autoconfigure.config.secretsmanager.SecretsManagerReloadAutoConfiguration 14 | io.awspring.cloud.autoconfigure.config.secretsmanager.SecretsManagerAutoConfiguration 15 | io.awspring.cloud.autoconfigure.config.parameterstore.ParameterStoreReloadAutoConfiguration 16 | io.awspring.cloud.autoconfigure.config.parameterstore.ParameterStoreAutoConfiguration 17 | io.awspring.cloud.autoconfigure.config.s3.S3ReloadAutoConfiguration 18 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/test/java/io/awspring/cloud/autoconfigure/s3/provider/MyAesProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2024 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.autoconfigure.s3.provider; 17 | 18 | import io.awspring.cloud.autoconfigure.s3.S3AesProvider; 19 | import javax.crypto.KeyGenerator; 20 | import javax.crypto.SecretKey; 21 | 22 | public class MyAesProvider implements S3AesProvider { 23 | @Override 24 | public SecretKey generateSecretKey() { 25 | try { 26 | KeyGenerator keyGenerator = KeyGenerator.getInstance("AES"); 27 | keyGenerator.init(256); 28 | return keyGenerator.generateKey(); 29 | } 30 | catch (Exception e) { 31 | return null; 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/test/java/io/awspring/cloud/autoconfigure/s3/provider/MyRsaProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2024 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.autoconfigure.s3.provider; 17 | 18 | import io.awspring.cloud.autoconfigure.s3.S3RsaProvider; 19 | import java.security.KeyPair; 20 | import java.security.KeyPairGenerator; 21 | 22 | public class MyRsaProvider implements S3RsaProvider { 23 | @Override 24 | public KeyPair generateKeyPair() { 25 | try { 26 | KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA"); 27 | keyPairGenerator.initialize(2048); 28 | return keyPairGenerator.generateKeyPair(); 29 | } 30 | catch (Exception e) { 31 | return null; 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/test/resources/config.properties: -------------------------------------------------------------------------------- 1 | spring.config.import=aws-secretsmanager:/config/spring,classpath:config_second.properties 2 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/test/resources/config_second.properties: -------------------------------------------------------------------------------- 1 | another-parameter=from properties file 2 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/test/resources/io/awspring/cloud/autoconfigure/core/CredentialsProviderAutoConfigurationTests-profile: -------------------------------------------------------------------------------- 1 | [default] 2 | aws_access_key_id=defaultKey 3 | aws_secret_access_key=defaultKey 4 | aws_session_token=defaultToken 5 | 6 | [customProfile] 7 | aws_access_key_id=testAccessKey 8 | aws_secret_access_key=testSecretKey 9 | aws_session_token=testSessionToken 10 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/test/resources/io/awspring/cloud/autoconfigure/core/RegionProviderAutoConfigurationTests-profile: -------------------------------------------------------------------------------- 1 | [default] 2 | aws_access_key_id=defaultKey 3 | aws_secret_access_key=defaultKey 4 | aws_session_token=defaultToken 5 | region=us-east-1 6 | 7 | [profile customProfile] 8 | aws_access_key_id=testAccessKey 9 | aws_secret_access_key=testSecretKey 10 | aws_session_token=testSessionToken 11 | region=eu-west-1 12 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/test/resources/io/awspring/cloud/autoconfigure/core/SesAutoConfigurationTest-profile: -------------------------------------------------------------------------------- 1 | [default] 2 | aws_access_key_id=defaultKey 3 | aws_secret_access_key=defaultKey 4 | aws_session_token=defaultToken 5 | 6 | -------------------------------------------------------------------------------- /spring-cloud-aws-autoconfigure/src/test/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /spring-cloud-aws-core/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | 8 | io.awspring.cloud 9 | spring-cloud-aws 10 | 3.4.0-SNAPSHOT 11 | 12 | 13 | spring-cloud-aws-core 14 | Spring Cloud AWS Core 15 | 16 | 17 | 18 | software.amazon.awssdk 19 | regions 20 | 21 | 22 | software.amazon.awssdk 23 | auth 24 | 25 | 26 | org.springframework 27 | spring-core 28 | 29 | 30 | 31 | 32 | 33 | 34 | src/main/resources/ 35 | true 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /spring-cloud-aws-core/src/main/java/io/awspring/cloud/core/AWSCoreRuntimeHints.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.core; 17 | 18 | import org.springframework.aot.hint.RuntimeHints; 19 | import org.springframework.aot.hint.RuntimeHintsRegistrar; 20 | 21 | public class AWSCoreRuntimeHints implements RuntimeHintsRegistrar { 22 | 23 | @Override 24 | public void registerHints(RuntimeHints hints, ClassLoader classLoader) { 25 | hints.resources().registerPattern("io/awspring/cloud/core/SpringCloudClientConfiguration.properties"); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /spring-cloud-aws-core/src/main/java/io/awspring/cloud/core/config/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Base classes for storing and retrieving configuration from AWS resources. 19 | */ 20 | @org.springframework.lang.NonNullApi 21 | @org.springframework.lang.NonNullFields 22 | package io.awspring.cloud.core.config; 23 | -------------------------------------------------------------------------------- /spring-cloud-aws-core/src/main/java/io/awspring/cloud/core/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Common infrastructure for all Spring Cloud AWS modules. 19 | */ 20 | @org.springframework.lang.NonNullApi 21 | @org.springframework.lang.NonNullFields 22 | package io.awspring.cloud.core; 23 | -------------------------------------------------------------------------------- /spring-cloud-aws-core/src/main/java/io/awspring/cloud/core/region/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Utilities for handling AWS region selection. 19 | */ 20 | @org.springframework.lang.NonNullApi 21 | @org.springframework.lang.NonNullFields 22 | package io.awspring.cloud.core.region; 23 | -------------------------------------------------------------------------------- /spring-cloud-aws-core/src/main/resources/META-INF/spring/aot.factories: -------------------------------------------------------------------------------- 1 | org.springframework.aot.hint.RuntimeHintsRegistrar=\ 2 | io.awspring.cloud.core.AWSCoreRuntimeHints 3 | -------------------------------------------------------------------------------- /spring-cloud-aws-core/src/main/resources/io/awspring/cloud/core/SpringCloudClientConfiguration.properties: -------------------------------------------------------------------------------- 1 | build.version=@pom.version@ 2 | -------------------------------------------------------------------------------- /spring-cloud-aws-docker-compose/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | spring-cloud-aws 8 | io.awspring.cloud 9 | 3.4.0-SNAPSHOT 10 | 11 | 4.0.0 12 | 13 | spring-cloud-aws-docker-compose 14 | Spring Cloud AWS Docker Compose 15 | Spring Cloud AWS Docker Compose Integration 16 | 17 | 18 | 19 | io.awspring.cloud 20 | spring-cloud-aws-autoconfigure 21 | 22 | 23 | org.springframework.boot 24 | spring-boot-docker-compose 25 | 26 | 27 | org.springframework 28 | spring-test 29 | test 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /spring-cloud-aws-docker-compose/src/main/java/io/awspring/cloud/docker/compose/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Docker Compose integration. 3 | */ 4 | @org.springframework.lang.NonNullApi 5 | @org.springframework.lang.NonNullFields 6 | package io.awspring.cloud.docker.compose; 7 | -------------------------------------------------------------------------------- /spring-cloud-aws-docker-compose/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.service.connection.ConnectionDetailsFactory=\ 2 | io.awspring.cloud.docker.compose.AwsDockerComposeConnectionDetailsFactory 3 | -------------------------------------------------------------------------------- /spring-cloud-aws-docker-compose/src/test/resources/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | localstack: 3 | image: localstack/localstack 4 | environment: 5 | AWS_ACCESS_KEY_ID: noop 6 | AWS_SECRET_ACCESS_KEY: noop 7 | AWS_DEFAULT_REGION: eu-central-1 8 | ports: 9 | - "4566:4566" 10 | -------------------------------------------------------------------------------- /spring-cloud-aws-dynamodb/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | spring-cloud-aws 7 | io.awspring.cloud 8 | 3.4.0-SNAPSHOT 9 | 10 | 4.0.0 11 | spring-cloud-aws-dynamodb 12 | Spring Cloud AWS DynamoDb Integration 13 | 14 | 15 | 16 | software.amazon.awssdk 17 | dynamodb 18 | 19 | 20 | org.springframework 21 | spring-core 22 | 23 | 24 | software.amazon.awssdk 25 | dynamodb-enhanced 26 | 27 | 28 | org.testcontainers 29 | localstack 30 | test 31 | 32 | 33 | org.testcontainers 34 | junit-jupiter 35 | test 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /spring-cloud-aws-dynamodb/src/main/java/io/awspring/cloud/dynamodb/DynamoDbTableNameResolver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.dynamodb; 17 | 18 | import software.amazon.awssdk.enhanced.dynamodb.mapper.annotations.DynamoDbBean; 19 | 20 | /** 21 | * Resolves DynamoDB table name from a {@link Class}. Used by {@link DynamoDbTemplate}. 22 | * 23 | * @author Matej Nedic 24 | * @since 3.0 25 | */ 26 | public interface DynamoDbTableNameResolver { 27 | 28 | /** 29 | * Resolves DynamoDb table name from a {@link Class} typically annotated with {@link DynamoDbBean}. 30 | * 31 | * @param clazz - the class from which DynamoDb table is resolved 32 | * @return the table name 33 | * @param - the type for class 34 | */ 35 | String resolve(Class clazz); 36 | } 37 | -------------------------------------------------------------------------------- /spring-cloud-aws-dynamodb/src/main/java/io/awspring/cloud/dynamodb/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * DynamoDb integration. 19 | */ 20 | @org.springframework.lang.NonNullApi 21 | @org.springframework.lang.NonNullFields 22 | package io.awspring.cloud.dynamodb; 23 | -------------------------------------------------------------------------------- /spring-cloud-aws-dynamodb/src/test/java/io/awspring/cloud/dynamodb/Book.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.dynamodb; 17 | 18 | import software.amazon.awssdk.enhanced.dynamodb.mapper.annotations.DynamoDbBean; 19 | import software.amazon.awssdk.enhanced.dynamodb.mapper.annotations.DynamoDbPartitionKey; 20 | 21 | @DynamoDbBean 22 | public class Book { 23 | private String title; 24 | private String subtitle; 25 | 26 | public Book() { 27 | } 28 | 29 | Book(String title, String subtitle) { 30 | this.title = title; 31 | this.subtitle = subtitle; 32 | } 33 | 34 | // title should never be partition key but for sake of a test. 35 | @DynamoDbPartitionKey 36 | public String getTitle() { 37 | return title; 38 | } 39 | 40 | public String getSubtitle() { 41 | return subtitle; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /spring-cloud-aws-dynamodb/src/test/java/io/awspring/cloud/dynamodb/FakePerson.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.dynamodb; 17 | 18 | public class FakePerson { 19 | 20 | private String firstName; 21 | private String lastName; 22 | 23 | public FakePerson() { 24 | } 25 | 26 | public FakePerson(String firstName, String lastName) { 27 | this.firstName = firstName; 28 | this.lastName = lastName; 29 | } 30 | 31 | public String getFirstName() { 32 | return firstName; 33 | } 34 | 35 | public String getLastName() { 36 | return lastName; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /spring-cloud-aws-dynamodb/src/test/java/io/awspring/cloud/dynamodb/Person.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.dynamodb; 17 | 18 | import software.amazon.awssdk.enhanced.dynamodb.mapper.annotations.DynamoDbBean; 19 | import software.amazon.awssdk.enhanced.dynamodb.mapper.annotations.DynamoDbPartitionKey; 20 | 21 | @DynamoDbBean 22 | public class Person { 23 | private String firstName; 24 | private String lastName; 25 | 26 | public Person() { 27 | } 28 | 29 | public Person(String firstName, String lastName) { 30 | this.firstName = firstName; 31 | this.lastName = lastName; 32 | } 33 | 34 | // FirstName should never be partition key but for sake of a test. 35 | @DynamoDbPartitionKey 36 | public String getFirstName() { 37 | return firstName; 38 | } 39 | 40 | public String getLastName() { 41 | return lastName; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /spring-cloud-aws-dynamodb/src/test/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /spring-cloud-aws-modulith/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | io.awspring.cloud 7 | spring-cloud-aws 8 | 3.4.0-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | spring-cloud-aws-modulith 13 | Spring Cloud AWS - Spring Modulith Integrations 14 | Spring Cloud AWS - Spring Modulith Integrations 15 | pom 16 | 17 | 18 | spring-cloud-aws-modulith-events-sns 19 | spring-cloud-aws-modulith-events-sqs 20 | 21 | 22 | -------------------------------------------------------------------------------- /spring-cloud-aws-modulith/spring-cloud-aws-modulith-events-sns/src/main/java/io/awspring/cloud/modulith/events/sns/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * AWS SNS event externalization support. 3 | */ 4 | @org.springframework.lang.NonNullApi 5 | package io.awspring.cloud.modulith.events.sns; 6 | -------------------------------------------------------------------------------- /spring-cloud-aws-modulith/spring-cloud-aws-modulith-events-sns/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | io.awspring.cloud.modulith.events.sns.SnsEventExternalizerConfiguration 2 | -------------------------------------------------------------------------------- /spring-cloud-aws-modulith/spring-cloud-aws-modulith-events-sns/src/test/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.modulith.events.jdbc.schema-initialization.enabled=true 2 | -------------------------------------------------------------------------------- /spring-cloud-aws-modulith/spring-cloud-aws-modulith-events-sns/src/test/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /spring-cloud-aws-modulith/spring-cloud-aws-modulith-events-sqs/src/main/java/io/awspring/cloud/modulith/events/sqs/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * AWS SQS event externalization support. 3 | */ 4 | @org.springframework.lang.NonNullApi 5 | package io.awspring.cloud.modulith.events.sqs; 6 | -------------------------------------------------------------------------------- /spring-cloud-aws-modulith/spring-cloud-aws-modulith-events-sqs/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports: -------------------------------------------------------------------------------- 1 | io.awspring.cloud.modulith.events.sqs.SqsEventExternalizerConfiguration 2 | -------------------------------------------------------------------------------- /spring-cloud-aws-modulith/spring-cloud-aws-modulith-events-sqs/src/test/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.artemis.embedded.topics=target 2 | spring.modulith.events.jdbc.schema-initialization.enabled=true 3 | -------------------------------------------------------------------------------- /spring-cloud-aws-modulith/spring-cloud-aws-modulith-events-sqs/src/test/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /spring-cloud-aws-parameter-store/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | io.awspring.cloud 7 | spring-cloud-aws 8 | 3.4.0-SNAPSHOT 9 | 10 | 11 | 4.0.0 12 | spring-cloud-aws-parameter-store 13 | Spring Cloud AWS Parameter Store Integration 14 | 15 | 16 | 17 | io.awspring.cloud 18 | spring-cloud-aws-core 19 | 20 | 21 | 22 | software.amazon.awssdk 23 | ssm 24 | 25 | 26 | org.springframework 27 | spring-context 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /spring-cloud-aws-parameter-store/src/main/java/io/awspring/cloud/parameterstore/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Integration with AWS Parameter Store. 19 | */ 20 | @org.springframework.lang.NonNullApi 21 | @org.springframework.lang.NonNullFields 22 | package io.awspring.cloud.parameterstore; 23 | -------------------------------------------------------------------------------- /spring-cloud-aws-s3/src/main/java/io/awspring/cloud/s3/S3Exception.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.s3; 17 | 18 | import org.springframework.lang.Nullable; 19 | 20 | /** 21 | * Exception thrown when S3 operation fails. 22 | * 23 | * @author Maciej Walkowiak 24 | */ 25 | public class S3Exception extends RuntimeException { 26 | 27 | public S3Exception(String message, @Nullable Throwable cause) { 28 | super(message, cause); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /spring-cloud-aws-s3/src/main/java/io/awspring/cloud/s3/S3ObjectContentTypeResolver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.s3; 17 | 18 | import org.springframework.lang.Nullable; 19 | 20 | /** 21 | * Resolves content type of S3 objects. 22 | * 23 | * @author Maciej Walkowiak 24 | * @since 3.0 25 | */ 26 | public interface S3ObjectContentTypeResolver { 27 | /** 28 | * Resolves content type from a file name. 29 | * 30 | * @param fileName - the file name 31 | * @return content type or null if not resolved 32 | */ 33 | @Nullable 34 | String resolveContentType(String fileName); 35 | } 36 | -------------------------------------------------------------------------------- /spring-cloud-aws-s3/src/main/java/io/awspring/cloud/s3/S3OutputStream.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.s3; 17 | 18 | import java.io.IOException; 19 | import java.io.OutputStream; 20 | 21 | /** 22 | * Represents {@link OutputStream} that writes data to S3. 23 | * 24 | * @author Maciej Walkowiak 25 | * @since 3.0 26 | */ 27 | public abstract class S3OutputStream extends OutputStream { 28 | 29 | /** 30 | * Cancels the upload and cleans up temporal resources (temp files, partial multipart upload). 31 | */ 32 | public void abort() throws IOException { 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /spring-cloud-aws-s3/src/main/java/io/awspring/cloud/s3/S3RuntimeHints.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.s3; 17 | 18 | import org.springframework.aot.hint.RuntimeHints; 19 | import org.springframework.aot.hint.RuntimeHintsRegistrar; 20 | 21 | public class S3RuntimeHints implements RuntimeHintsRegistrar { 22 | @Override 23 | public void registerHints(RuntimeHints hints, ClassLoader classLoader) { 24 | hints.resources().registerPattern("io/awspring/cloud/s3/S3ObjectContentTypeResolver.properties"); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /spring-cloud-aws-s3/src/main/java/io/awspring/cloud/s3/UploadFailedException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.s3; 17 | 18 | import org.springframework.lang.Nullable; 19 | 20 | /** 21 | * Thrown when uploading to S3 fails. 22 | * 23 | * @author Maciej Walkowiak 24 | * @since 3.0 25 | */ 26 | public class UploadFailedException extends S3Exception { 27 | 28 | /** 29 | * A path to temporary location containing a file that has not been uploaded to S3. 30 | */ 31 | @Nullable 32 | private final String path; 33 | 34 | public UploadFailedException(@Nullable String path, @Nullable Exception se) { 35 | super("Upload failed. File is stored in a temporary folder in the filesystem " + path, se); 36 | this.path = path; 37 | } 38 | 39 | @Nullable 40 | public String getPath() { 41 | return path; 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /spring-cloud-aws-s3/src/main/java/io/awspring/cloud/s3/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * S3 integration. 19 | */ 20 | @org.springframework.lang.NonNullApi 21 | @org.springframework.lang.NonNullFields 22 | package io.awspring.cloud.s3; 23 | -------------------------------------------------------------------------------- /spring-cloud-aws-s3/src/main/resources/META-INF/spring/aot.factories: -------------------------------------------------------------------------------- 1 | org.springframework.aot.hint.RuntimeHintsRegistrar=\ 2 | io.awspring.cloud.s3.S3RuntimeHints 3 | -------------------------------------------------------------------------------- /spring-cloud-aws-s3/src/test/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /spring-cloud-aws-samples/.gitignore: -------------------------------------------------------------------------------- 1 | *.js 2 | !jest.config.js 3 | *.d.ts 4 | node_modules 5 | 6 | # CDK asset staging directory 7 | .cdk.staging 8 | cdk.out 9 | 10 | # Parcel default cache directory 11 | .parcel-cache 12 | -------------------------------------------------------------------------------- /spring-cloud-aws-samples/.npmignore: -------------------------------------------------------------------------------- 1 | *.ts 2 | !*.d.ts 3 | 4 | # CDK asset staging directory 5 | .cdk.staging 6 | cdk.out 7 | -------------------------------------------------------------------------------- /spring-cloud-aws-samples/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | 3 | services: 4 | localstack: 5 | container_name: "${LOCALSTACK_DOCKER_NAME-localstack_main}" 6 | image: localstack/localstack:4.4.0 7 | ports: 8 | - "127.0.0.1:4566:4566" # LocalStack Gateway 9 | - "127.0.0.1:4510-4559:4510-4559" # external services port range 10 | environment: 11 | - LOCALSTACK_API_KEY=${LOCALSTACK_API_KEY} 12 | - DEBUG=${DEBUG-} 13 | - LAMBDA_EXECUTOR=${LAMBDA_EXECUTOR-} 14 | - DOCKER_HOST=unix:///var/run/docker.sock 15 | volumes: 16 | - "${LOCALSTACK_VOLUME_DIR:-./volume}:/var/lib/localstack" 17 | - "/var/run/docker.sock:/var/run/docker.sock" 18 | -------------------------------------------------------------------------------- /spring-cloud-aws-samples/infrastructure/cdk.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": "mvn -e -q compile exec:java", 3 | "watch": { 4 | "include": [ 5 | "**" 6 | ], 7 | "exclude": [ 8 | "README.md", 9 | "cdk*.json", 10 | "target", 11 | "pom.xml", 12 | "src/test" 13 | ] 14 | }, 15 | "context": { 16 | "@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId": true, 17 | "@aws-cdk/core:stackRelativeExports": true, 18 | "@aws-cdk/aws-rds:lowercaseDbIdentifier": true, 19 | "@aws-cdk/aws-lambda:recognizeVersionProps": true, 20 | "@aws-cdk/aws-cloudfront:defaultSecurityPolicyTLSv1.2_2021": true, 21 | "@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver": true, 22 | "@aws-cdk/aws-ec2:uniqueImdsv2TemplateName": true, 23 | "@aws-cdk/core:target-partitions": [ 24 | "aws", 25 | "aws-cn" 26 | ] 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /spring-cloud-aws-samples/infrastructure/src/main/java/io/awspring/cloud/samples/infrastructure/InfrastructureApp.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.samples.infrastructure; 17 | 18 | import software.amazon.awscdk.App; 19 | import software.amazon.awscdk.StackProps; 20 | 21 | public class InfrastructureApp { 22 | 23 | public static void main(final String[] args) { 24 | App app = new App(); 25 | 26 | new InfrastructureStack(app, "InfrastructureStack", StackProps.builder().build()); 27 | 28 | app.synth(); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /spring-cloud-aws-samples/readme.md: -------------------------------------------------------------------------------- 1 | # Spring Cloud AWS Samples 2 | 3 | Samples are prepared to run on LocalStack - a local equivalent of AWS. 4 | 5 | To start LocalStack locally: 6 | 7 | ``` 8 | $ docker-compose up 9 | ``` 10 | 11 | ## Infrastructure 12 | 13 | Samples use AWS CDK to create the infrastructure components to run the sample. To deploy infrastructure, you need to install CDK and [CDK local](https://github.com/localstack/aws-cdk-local): 14 | 15 | ``` 16 | $ npm install -g aws-cdk-local aws-cdk 17 | ``` 18 | 19 | Then, in `infrastructure` directory: 20 | 21 | ``` 22 | $ mvn package 23 | $ cdklocal bootstrap 24 | $ cdklocal deploy 25 | ``` 26 | 27 | ## How to run? 28 | 29 | Samples are regular Spring Boot applications. The best way to run them is to run the main `@SpringBootApplication` annotated class directly from an IDE. 30 | 31 | ## How to destroy infrastructure? 32 | 33 | Infrastructure is destroyed once LocalStack container shuts down. If you want to destroy infrastructure manually, run: 34 | 35 | ``` 36 | $ cdklocal destroy 37 | ``` 38 | 39 | ## How to run against real AWS? 40 | 41 | To run samples against real AWS, update `spring.cloud.aws` properties in sample's `application.properties` to reflect your AWS configuration or delete these properties completely to use defaults. 42 | -------------------------------------------------------------------------------- /spring-cloud-aws-samples/spring-cloud-aws-docker-compose-sample/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | localstack: 3 | image: localstack/localstack 4 | container_name: localstack 5 | environment: 6 | SERVICES: sqs 7 | AWS_ACCESS_KEY_ID: noop 8 | AWS_SECRET_ACCESS_KEY: noop 9 | AWS_DEFAULT_REGION: eu-central-1 10 | ports: 11 | - "4566:4566" 12 | -------------------------------------------------------------------------------- /spring-cloud-aws-samples/spring-cloud-aws-docker-compose-sample/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | spring-cloud-aws-samples 7 | io.awspring.cloud 8 | 3.4.0-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | spring-cloud-aws-docker-compose-sample 13 | Spring Cloud AWS Docker Compose Sample 14 | 15 | 16 | 17 | org.springframework.boot 18 | spring-boot-starter 19 | 20 | 21 | 22 | io.awspring.cloud 23 | spring-cloud-aws-starter-sqs 24 | 25 | 26 | 27 | io.awspring.cloud 28 | spring-cloud-aws-docker-compose 29 | runtime 30 | true 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /spring-cloud-aws-samples/spring-cloud-aws-docker-compose-sample/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.application.name=spring-cloud-aws-docker-compose-sample 2 | 3 | # Notice we don't need to configure spring.cloud.aws.* properties (endpoint, region, access keys), 4 | # since this is configured in the docker-compose.yaml file and automatically picked up by the application 5 | 6 | spring.docker.compose.file=spring-cloud-aws-samples/spring-cloud-aws-docker-compose-sample/docker-compose.yaml 7 | -------------------------------------------------------------------------------- /spring-cloud-aws-samples/spring-cloud-aws-dynamodb-sample/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | spring-cloud-aws-samples 7 | io.awspring.cloud 8 | 3.4.0-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | spring-cloud-aws-dynamodb-sample 13 | Spring Cloud AWS DynamoDb Sample 14 | 15 | 16 | 17 | org.springframework.boot 18 | spring-boot-starter 19 | 20 | 21 | 22 | io.awspring.cloud 23 | spring-cloud-aws-starter-dynamodb 24 | 25 | 26 | 27 | io.awspring.cloud 28 | spring-cloud-aws-testcontainers 29 | test 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /spring-cloud-aws-samples/spring-cloud-aws-dynamodb-sample/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # LocalStack configuration 2 | spring.cloud.aws.endpoint=http://localhost:4566 3 | spring.cloud.aws.region.static=us-east-1 4 | spring.cloud.aws.credentials.access-key=noop 5 | spring.cloud.aws.credentials.secret-key=noop 6 | -------------------------------------------------------------------------------- /spring-cloud-aws-samples/spring-cloud-aws-parameter-store-sample/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | io.awspring.cloud 7 | spring-cloud-aws-samples 8 | 3.4.0-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | spring-cloud-aws-parameter-store-sample 13 | Spring Cloud AWS Parameter Store Sample 14 | 15 | 16 | 17 | org.springframework.boot 18 | spring-boot-starter 19 | 20 | 21 | io.awspring.cloud 22 | spring-cloud-aws-starter-parameter-store 23 | 24 | 25 | 26 | 27 | 28 | 29 | org.springframework.boot 30 | spring-boot-maven-plugin 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /spring-cloud-aws-samples/spring-cloud-aws-parameter-store-sample/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # importing single parameter 2 | spring.config.import=aws-parameterstore:/config/spring/ 3 | logging.level.io.awspring.cloud=debug 4 | 5 | # LocalStack configuration 6 | spring.cloud.aws.endpoint=http://localhost:4566 7 | spring.cloud.aws.region.static=us-east-1 8 | spring.cloud.aws.credentials.access-key=noop 9 | spring.cloud.aws.credentials.secret-key=noop 10 | 11 | # importing multiple parameters 12 | # spring.config.import: aws-parameterstore:/config/spring;/config/common 13 | 14 | # secrets can be marked as optional - if any of them does not exist application startup will continue 15 | # spring.config.import: optional:aws-parameterstore:/config/spring;/config/common 16 | -------------------------------------------------------------------------------- /spring-cloud-aws-samples/spring-cloud-aws-s3-sample/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | io.awspring.cloud 7 | spring-cloud-aws-samples 8 | 3.4.0-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | spring-cloud-aws-s3-sample 13 | Spring Cloud AWS S3 Sample 14 | 15 | 16 | 17 | org.springframework.boot 18 | spring-boot-starter-web 19 | 20 | 21 | io.awspring.cloud 22 | spring-cloud-aws-starter-s3 23 | 24 | 25 | 26 | 27 | 28 | 29 | org.springframework.boot 30 | spring-boot-maven-plugin 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /spring-cloud-aws-samples/spring-cloud-aws-s3-sample/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # LocalStack configuration 2 | spring.cloud.aws.endpoint=http://localhost:4566 3 | spring.cloud.aws.region.static=us-east-1 4 | spring.cloud.aws.credentials.access-key=noop 5 | spring.cloud.aws.credentials.secret-key=noop 6 | -------------------------------------------------------------------------------- /spring-cloud-aws-samples/spring-cloud-aws-secrets-manager-sample/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | # importing single secret 2 | #spring.config.import: aws-secretsmanager:/secrets/spring-cloud-aws-sample-app 3 | logging.level: 4 | io.awspring.cloud.secretsmanager: debug 5 | 6 | # LocalStack configuration 7 | spring.cloud.aws.endpoint: http://localhost:4566 8 | spring.cloud.aws.region.static: us-east-1 9 | spring.cloud.aws.credentials.access-key: noop 10 | spring.cloud.aws.credentials.secret-key: noop 11 | 12 | # importing multiple secrets 13 | # spring.config.import: aws-secretsmanager:/secrets/spring-cloud-aws-sample-app;/secret/common 14 | 15 | # importing secrets based on spring.application.name property value for each active profile 16 | # NOTE: if any of the secrets is missing, application won't start unless the "optional" prefix is set 17 | #spring.config.import: "aws-secretsmanager:" 18 | 19 | # secrets can be marked as optional - if any of them does not exist application startup will continue 20 | # spring.config.import: optional:aws-secretsmanager:/secrets/spring-cloud-aws-sample-app;/secret/common 21 | 22 | -------------------------------------------------------------------------------- /spring-cloud-aws-samples/spring-cloud-aws-ses-sample/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.8' 2 | 3 | services: 4 | ses-sample-localstack: 5 | container_name: localstack 6 | environment: 7 | - DEBUG=1 8 | - LOCALSTACK_HOSTNAME=localhost 9 | - TEST_AWS_ACCOUNT_ID=000000000000 10 | - AWS_DEFAULT_REGION=us-east-1 11 | - SERVICES=ses 12 | - S3_MOUNT=/tmp 13 | image: localstack/localstack:latest 14 | ports: 15 | - "4566:4566" 16 | volumes: 17 | - /var/run/docker.sock:/var/run/docker.sock 18 | 19 | -------------------------------------------------------------------------------- /spring-cloud-aws-samples/spring-cloud-aws-ses-sample/src/main/resources/answer.txt: -------------------------------------------------------------------------------- 1 | Question to Spring Cloud AWS: What is the meaning of life, the universe, and everything? 2 | Answer from Spring Cloud AWS: 42 3 | -------------------------------------------------------------------------------- /spring-cloud-aws-samples/spring-cloud-aws-ses-sample/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # LocalStack configuration 2 | spring.cloud.aws.endpoint=http://localhost:4566 3 | spring.cloud.aws.region.static=us-east-1 4 | spring.cloud.aws.credentials.access-key=noop 5 | spring.cloud.aws.credentials.secret-key=noop 6 | -------------------------------------------------------------------------------- /spring-cloud-aws-samples/spring-cloud-aws-sns-sample/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | spring-cloud-aws-samples 7 | io.awspring.cloud 8 | 3.4.0-SNAPSHOT 9 | 10 | 4.0.0 11 | spring-cloud-aws-sns-sample 12 | 13 | 14 | 15 | org.springframework.boot 16 | spring-boot-starter 17 | 18 | 19 | 20 | org.springframework.boot 21 | spring-boot-starter-web 22 | 23 | 24 | 25 | io.awspring.cloud 26 | spring-cloud-aws-starter-sns 27 | 28 | 29 | 30 | 31 | 32 | 33 | org.springframework.boot 34 | spring-boot-maven-plugin 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /spring-cloud-aws-samples/spring-cloud-aws-sns-sample/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # LocalStack configuration 2 | spring.cloud.aws.endpoint=http://localhost:4566 3 | spring.cloud.aws.region.static=us-east-1 4 | spring.cloud.aws.credentials.access-key=noop 5 | spring.cloud.aws.credentials.secret-key=noop 6 | -------------------------------------------------------------------------------- /spring-cloud-aws-samples/spring-cloud-aws-sqs-sample/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | spring-cloud-aws-samples 7 | io.awspring.cloud 8 | 3.4.0-SNAPSHOT 9 | 10 | 4.0.0 11 | spring-cloud-aws-sqs-sample 12 | 13 | 14 | 15 | org.springframework.boot 16 | spring-boot-starter 17 | 18 | 19 | 20 | org.springframework.boot 21 | spring-boot-starter-web 22 | 23 | 24 | 25 | io.awspring.cloud 26 | spring-cloud-aws-starter-sqs 27 | 28 | 29 | 30 | 31 | 32 | 33 | org.springframework.boot 34 | spring-boot-maven-plugin 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /spring-cloud-aws-samples/spring-cloud-aws-sqs-sample/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # LocalStack configuration 2 | spring.cloud.aws.endpoint=http://localhost:4566 3 | spring.cloud.aws.region.static=us-east-1 4 | spring.cloud.aws.credentials.access-key=noop 5 | spring.cloud.aws.credentials.secret-key=noop 6 | -------------------------------------------------------------------------------- /spring-cloud-aws-secrets-manager/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | io.awspring.cloud 7 | spring-cloud-aws 8 | 3.4.0-SNAPSHOT 9 | 10 | 4.0.0 11 | 12 | spring-cloud-aws-secrets-manager 13 | Spring Cloud AWS Secrets Manager Integration 14 | 15 | 16 | 17 | org.springframework 18 | spring-core 19 | 20 | 21 | io.awspring.cloud 22 | spring-cloud-aws-core 23 | 24 | 25 | 26 | software.amazon.awssdk 27 | secretsmanager 28 | 29 | 30 | com.fasterxml.jackson.core 31 | jackson-databind 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /spring-cloud-aws-secrets-manager/src/main/java/io/awspring/cloud/secretsmanager/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Integration with AWS Secrets Manager. 19 | */ 20 | @org.springframework.lang.NonNullApi 21 | @org.springframework.lang.NonNullFields 22 | package io.awspring.cloud.secretsmanager; 23 | -------------------------------------------------------------------------------- /spring-cloud-aws-ses/src/main/java/io/awspring/cloud/ses/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Integration with AWS SES (Simple Email Service). 19 | */ 20 | @org.springframework.lang.NonNullApi 21 | @org.springframework.lang.NonNullFields 22 | package io.awspring.cloud.ses; 23 | -------------------------------------------------------------------------------- /spring-cloud-aws-sns/src/main/java/io/awspring/cloud/sns/annotation/endpoint/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Convenience annotations serving as a replacement for {@link org.springframework.web.bind.annotation.RequestMapping} 19 | * for SNS HTTP endpoints. 20 | */ 21 | @org.springframework.lang.NonNullApi 22 | @org.springframework.lang.NonNullFields 23 | package io.awspring.cloud.sns.annotation.endpoint; 24 | -------------------------------------------------------------------------------- /spring-cloud-aws-sns/src/main/java/io/awspring/cloud/sns/annotation/handlers/NotificationMessage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.sns.annotation.handlers; 17 | 18 | import java.lang.annotation.ElementType; 19 | import java.lang.annotation.Retention; 20 | import java.lang.annotation.RetentionPolicy; 21 | import java.lang.annotation.Target; 22 | 23 | /** 24 | * Annotation that is used to map SNS notification value to a variable that is annotated. Used in Controllers method for 25 | * handling/receiving SNS notifications. 26 | * 27 | * @author Alain Sahli 28 | */ 29 | @Retention(RetentionPolicy.RUNTIME) 30 | @Target(ElementType.PARAMETER) 31 | public @interface NotificationMessage { 32 | 33 | } 34 | -------------------------------------------------------------------------------- /spring-cloud-aws-sns/src/main/java/io/awspring/cloud/sns/annotation/handlers/NotificationSubject.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.sns.annotation.handlers; 17 | 18 | import java.lang.annotation.ElementType; 19 | import java.lang.annotation.Retention; 20 | import java.lang.annotation.RetentionPolicy; 21 | import java.lang.annotation.Target; 22 | 23 | /** 24 | * 25 | * Annotation that is used to map SNS subject value to a variable that is annotated. Used in Controllers method for 26 | * handling/receiving SNS notifications. 27 | * 28 | * @author Alain Sahli 29 | */ 30 | @Retention(RetentionPolicy.RUNTIME) 31 | @Target(ElementType.PARAMETER) 32 | public @interface NotificationSubject { 33 | 34 | } 35 | -------------------------------------------------------------------------------- /spring-cloud-aws-sns/src/main/java/io/awspring/cloud/sns/annotation/handlers/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Spring Web method argument handlers for Sns integration. 19 | */ 20 | @org.springframework.lang.NonNullApi 21 | @org.springframework.lang.NonNullFields 22 | package io.awspring.cloud.sns.annotation.handlers; 23 | -------------------------------------------------------------------------------- /spring-cloud-aws-sns/src/main/java/io/awspring/cloud/sns/configuration/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Sns integration configuration helpers. 19 | */ 20 | @org.springframework.lang.NonNullApi 21 | @org.springframework.lang.NonNullFields 22 | package io.awspring.cloud.sns.configuration; 23 | -------------------------------------------------------------------------------- /spring-cloud-aws-sns/src/main/java/io/awspring/cloud/sns/core/SnsOperations.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.sns.core; 17 | 18 | /** 19 | * High level SNS operations. 20 | * 21 | * @author Maciej Walkowiak 22 | * @author Hardik Singh Behl 23 | * @since 3.0 24 | */ 25 | public interface SnsOperations { 26 | 27 | /** 28 | * Sends a notification to a topic. 29 | * 30 | * @param topic - the topic 31 | * @param notification - the notification 32 | */ 33 | void sendNotification(String topic, SnsNotification notification); 34 | 35 | /** 36 | * Checks if topic with given ARN exists. 37 | * 38 | * @param topicArn - ARN of the topic 39 | * @return true if topic exists, false otherwise 40 | */ 41 | boolean topicExists(String topicArn); 42 | } 43 | -------------------------------------------------------------------------------- /spring-cloud-aws-sns/src/main/java/io/awspring/cloud/sns/core/TopicArnResolver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.sns.core; 17 | 18 | import software.amazon.awssdk.arns.Arn; 19 | 20 | /** 21 | * Resolves topic ARN by name. 22 | * 23 | * @author Matej Nedic 24 | */ 25 | public interface TopicArnResolver { 26 | 27 | Arn resolveTopicArn(String topicName); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /spring-cloud-aws-sns/src/main/java/io/awspring/cloud/sns/core/TopicNotFoundException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.sns.core; 17 | 18 | /** 19 | * Thrown when {@link TopicsListingTopicArnResolver} cannot determine ARN based on topicName. 20 | * 21 | * @author Matej Nedic 22 | * @since 3.0.0 23 | */ 24 | public class TopicNotFoundException extends RuntimeException { 25 | 26 | public TopicNotFoundException(String message) { 27 | super(message); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /spring-cloud-aws-sns/src/main/java/io/awspring/cloud/sns/core/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Sns integration core. 19 | */ 20 | @org.springframework.lang.NonNullApi 21 | @org.springframework.lang.NonNullFields 22 | package io.awspring.cloud.sns.core; 23 | -------------------------------------------------------------------------------- /spring-cloud-aws-sns/src/main/java/io/awspring/cloud/sns/handlers/NotificationStatus.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.sns.handlers; 17 | 18 | import io.awspring.cloud.sns.annotation.endpoint.NotificationSubscriptionMapping; 19 | import io.awspring.cloud.sns.annotation.endpoint.NotificationUnsubscribeConfirmationMapping; 20 | 21 | /** 22 | * Interface used for confirming Subscription/Unsubscription. Implementation of interface can be used in Controllers 23 | * methods that are annotated with {@link NotificationSubscriptionMapping} and 24 | * {@link NotificationUnsubscribeConfirmationMapping}. 25 | * 26 | * @author Agim Emruli 27 | */ 28 | public interface NotificationStatus { 29 | 30 | void confirmSubscription(); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /spring-cloud-aws-sns/src/main/java/io/awspring/cloud/sns/handlers/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Method argument handlers for SNS integration annotations from {@link io.awspring.cloud.sns.annotation.handlers} 19 | * package. 20 | */ 21 | @org.springframework.lang.NonNullApi 22 | @org.springframework.lang.NonNullFields 23 | package io.awspring.cloud.sns.handlers; 24 | -------------------------------------------------------------------------------- /spring-cloud-aws-sns/src/main/java/io/awspring/cloud/sns/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Integration with AWS SNS (Simple Notification Service). 19 | */ 20 | @org.springframework.lang.NonNullApi 21 | @org.springframework.lang.NonNullFields 22 | package io.awspring.cloud.sns; 23 | -------------------------------------------------------------------------------- /spring-cloud-aws-sns/src/main/java/io/awspring/cloud/sns/sms/SmsType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.sns.sms; 17 | 18 | /** 19 | * The type of message that you're sending. 20 | * 21 | * @author Matej Nedic 22 | * @since 3.0.0 23 | */ 24 | public enum SmsType { 25 | /** 26 | * Non-critical messages, such as marketing messages. 27 | */ 28 | PROMOTIONAL("Promotional"), 29 | /** 30 | * Critical messages that support customer transactions. 31 | */ 32 | TRANSACTIONAL("Transactional"); 33 | 34 | private final String type; 35 | 36 | SmsType(String type) { 37 | this.type = type; 38 | } 39 | 40 | String getType() { 41 | return type; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /spring-cloud-aws-sns/src/main/java/io/awspring/cloud/sns/sms/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Sending SMS via SNS integration. 19 | */ 20 | @org.springframework.lang.NonNullApi 21 | @org.springframework.lang.NonNullFields 22 | package io.awspring.cloud.sns.sms; 23 | -------------------------------------------------------------------------------- /spring-cloud-aws-sns/src/main/resources/META-INF/spring/aot.factories: -------------------------------------------------------------------------------- 1 | org.springframework.aot.hint.RuntimeHintsRegistrar=\ 2 | io.awspring.cloud.sns.SnsRuntimeHints 3 | -------------------------------------------------------------------------------- /spring-cloud-aws-sns/src/test/java/io/awspring/cloud/sns/Matchers.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.sns; 17 | 18 | import static org.mockito.ArgumentMatchers.argThat; 19 | 20 | import java.util.function.Consumer; 21 | import software.amazon.awssdk.services.sns.model.PublishRequest; 22 | 23 | public class Matchers { 24 | public static PublishRequest requestMatches(Consumer consumer) { 25 | return argThat(it -> { 26 | consumer.accept(it); 27 | return true; 28 | }); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /spring-cloud-aws-sns/src/test/java/io/awspring/cloud/sns/Person.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.sns; 17 | 18 | public class Person { 19 | private String name; 20 | 21 | public Person() { 22 | } 23 | 24 | public Person(String name) { 25 | this.name = name; 26 | } 27 | 28 | public String getName() { 29 | return name; 30 | } 31 | 32 | public void setName(String name) { 33 | this.name = name; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /spring-cloud-aws-sns/src/test/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /spring-cloud-aws-sns/src/test/resources/notificationMessage-complexObject-UTF-8-Check.json: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "Notification", 3 | "MessageId": "7aae457b-2894-56fe-8fe4-0bd5c32b9d60", 4 | "TopicArn": "arn:aws:sns:eu-west-1:123453123:IntegrationTestStack-SqsReceivingSnsTopic", 5 | "Subject": "Notification Subject", 6 | "Message": "{\"firstName\":\"الْحُرُوف\",\"lastName\":\"口廿竹十火\"}", 7 | "Timestamp": "2015-10-31T16:17:03.713Z", 8 | "SignatureVersion": "1", 9 | "Signature": "NJ62TPLaeXeiecIc==", 10 | "SigningCertURL": "https://sns.eu-west-1.amazonaws.com/SimpleNotificationService-bb750dd426d95ee9390147a5624348ee.pem", 11 | "UnsubscribeURL": "https://sns.eu-west-1.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=a", 12 | "MessageAttributes": { 13 | "NOTIFICATION_SUBJECT_HEADER": { 14 | "Type": "String", 15 | "Value": "Hello default destination" 16 | }, 17 | "id": { 18 | "Type": "String", 19 | "Value": "5c450be3-1eab-8f4d-abcc-48772cce6f5d" 20 | }, 21 | "contentType": { 22 | "Type": "String", 23 | "Value": "application/json;" 24 | }, 25 | "timestamp": { 26 | "Type": "Number.java.lang.Long", 27 | "Value": "1446308223696" 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /spring-cloud-aws-sns/src/test/resources/notificationMessage-complexObject.json: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "Notification", 3 | "MessageId": "7aae457b-2894-56fe-8fe4-0bd5c32b9d60", 4 | "TopicArn": "arn:aws:sns:eu-west-1:123453123:IntegrationTestStack-SqsReceivingSnsTopic", 5 | "Subject": "Notification Subject", 6 | "Message": "{\"firstName\":\"Agim\",\"lastName\":\"Emruli\"}", 7 | "Timestamp": "2015-10-31T16:17:03.713Z", 8 | "SignatureVersion": "1", 9 | "Signature": "NJ62TPLaeXeiecIc==", 10 | "SigningCertURL": "https://sns.eu-west-1.amazonaws.com/SimpleNotificationService-bb750dd426d95ee9390147a5624348ee.pem", 11 | "UnsubscribeURL": "https://sns.eu-west-1.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=a", 12 | "MessageAttributes": { 13 | "NOTIFICATION_SUBJECT_HEADER": { 14 | "Type": "String", 15 | "Value": "Hello default destination" 16 | }, 17 | "id": { 18 | "Type": "String", 19 | "Value": "5c450be3-1eab-8f4d-abcc-48772cce6f5d" 20 | }, 21 | "contentType": { 22 | "Type": "String", 23 | "Value": "application/json;charset=UTF-8" 24 | }, 25 | "timestamp": { 26 | "Type": "Number.java.lang.Long", 27 | "Value": "1446308223696" 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /spring-cloud-aws-sns/src/test/resources/notificationMessage.json: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "Notification", 3 | "MessageId": "f2c15fec-c617-5b08-b54d-13c4099fec60", 4 | "TopicArn": "arn:aws:sns:eu-west-1:111111111111:mySampleTopic", 5 | "Subject": "asdasd", 6 | "Message": "asdasd", 7 | "Timestamp": "2014-06-28T14:12:24.418Z", 8 | "SignatureVersion": "1", 9 | "Signature": "XDvKSAnhxECrAmyIrs0Dsfbp/tnKD1IvoOOYTU28FtbUoxr/CgziuW87yZwTuSNNbHJbdD3BEjHS0vKewm0xBeQ0PToDkgtoORXo5RWnmShDQ2nhkthFhZnNulKtmFtRogjBtCwbz8sPnbOCSk21ruyXNdV2RUbdDalndAW002CWEQmYMxFSN6OXUtMueuT610aX+tqeYP4Z6+8WTWLWjAuVyy7rOI6KHYBcVDhKtskvTOPZ4tiVohtQdQbO2Gjuh1vblRzzwMkfaoFTSWImd4pFXxEsv/fq9aGIlqq9xEryJ0w2huFwI5gxyhvGt0RnTd9YvmAEC+WzdJDOqaDNxg==", 10 | "SigningCertURL": "https://sns.eu-west-1.amazonaws.com/SimpleNotificationService-e372f8ca30337fdb084e8ac449342c77.pem", 11 | "UnsubscribeURL": "https://sns.eu-west-1.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=arn:aws:sns:eu-west-1:721324560415:mySampleTopic:9859a6c9-6083-4690-ab02-d1aead3442df", 12 | "MessageAttributes": { 13 | "AWS.SNS.MOBILE.MPNS.Type": { 14 | "Type": "String", 15 | "Value": "token" 16 | }, 17 | "AWS.SNS.MOBILE.WNS.Type": { 18 | "Type": "String", 19 | "Value": "wns/badge" 20 | }, 21 | "AWS.SNS.MOBILE.MPNS.NotificationClass": { 22 | "Type": "String", 23 | "Value": "realtime" 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /spring-cloud-aws-sqs/src/main/java/io/awspring/cloud/sqs/MessagingHeaders.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.sqs; 17 | 18 | /** 19 | * {@link org.springframework.messaging.MessageHeaders} associated with messaging operations. 20 | * @author Tomaz Fernandes 21 | * @since 3.0 22 | */ 23 | public class MessagingHeaders { 24 | 25 | /** 26 | * Header for a {@link io.awspring.cloud.sqs.listener.acknowledgement.AcknowledgementCallback} for this message. 27 | */ 28 | public static final String ACKNOWLEDGMENT_CALLBACK_HEADER = "AcknowledgementCallback"; 29 | 30 | } 31 | -------------------------------------------------------------------------------- /spring-cloud-aws-sqs/src/main/java/io/awspring/cloud/sqs/QueueAttributesResolvingException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.sqs; 17 | 18 | /** 19 | * Exception thrown when a {@link QueueAttributesResolver} fails. 20 | * 21 | * @author Tomaz Fernandes 22 | * @since 3.0 23 | * @see io.awspring.cloud.sqs.listener.QueueNotFoundStrategy 24 | */ 25 | public class QueueAttributesResolvingException extends RuntimeException { 26 | 27 | /** 28 | * Create an instance with the message and throwable cause. 29 | * @param message the error message. 30 | * @param cause the cause. 31 | */ 32 | public QueueAttributesResolvingException(String message, Throwable cause) { 33 | super(message, cause); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /spring-cloud-aws-sqs/src/main/java/io/awspring/cloud/sqs/SqsException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.sqs; 17 | 18 | import org.springframework.core.NestedRuntimeException; 19 | import org.springframework.lang.Nullable; 20 | 21 | /** 22 | * Top-level exception for Sqs {@link RuntimeException} instances. 23 | * 24 | * @author Tomaz Fernandes 25 | * @since 3.0 26 | */ 27 | public class SqsException extends NestedRuntimeException { 28 | 29 | /** 30 | * Construct an instance with the supplied message and cause. 31 | * @param msg the message. 32 | * @param cause the cause. 33 | */ 34 | public SqsException(String msg, @Nullable Throwable cause) { 35 | super(msg, cause); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /spring-cloud-aws-sqs/src/main/java/io/awspring/cloud/sqs/annotation/SnsNotificationMessage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.sqs.annotation; 17 | 18 | import java.lang.annotation.ElementType; 19 | import java.lang.annotation.Retention; 20 | import java.lang.annotation.RetentionPolicy; 21 | import java.lang.annotation.Target; 22 | 23 | /** 24 | * Annotation that is used to map SNS notification value on an SQS Queue to a variable that is annotated. Used in 25 | * Controllers method for handling/receiving SQS notifications. 26 | * 27 | * @author Michael Sosa 28 | * @since 3.1.1 29 | */ 30 | @Retention(RetentionPolicy.RUNTIME) 31 | @Target(ElementType.PARAMETER) 32 | public @interface SnsNotificationMessage { 33 | 34 | } 35 | -------------------------------------------------------------------------------- /spring-cloud-aws-sqs/src/main/java/io/awspring/cloud/sqs/annotation/SnsNotificationSubject.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.sqs.annotation; 17 | 18 | import java.lang.annotation.ElementType; 19 | import java.lang.annotation.Retention; 20 | import java.lang.annotation.RetentionPolicy; 21 | import java.lang.annotation.Target; 22 | 23 | /** 24 | * Annotation that is used to map SNS notification subject on an SQS Queue to a variable that is annotated. Used in 25 | * Controllers method for handling/receiving SQS notifications. 26 | * 27 | * @author Alexander Nebel 28 | * @since 3.3.1 29 | */ 30 | @Retention(RetentionPolicy.RUNTIME) 31 | @Target(ElementType.PARAMETER) 32 | public @interface SnsNotificationSubject { 33 | 34 | } 35 | -------------------------------------------------------------------------------- /spring-cloud-aws-sqs/src/main/java/io/awspring/cloud/sqs/annotation/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * SqsListener annotation and classes to process it. 19 | */ 20 | @org.springframework.lang.NonNullApi 21 | @org.springframework.lang.NonNullFields 22 | package io.awspring.cloud.sqs.annotation; 23 | -------------------------------------------------------------------------------- /spring-cloud-aws-sqs/src/main/java/io/awspring/cloud/sqs/config/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Assembly-time components for SQS. 19 | */ 20 | @org.springframework.lang.NonNullApi 21 | @org.springframework.lang.NonNullFields 22 | package io.awspring.cloud.sqs.config; 23 | -------------------------------------------------------------------------------- /spring-cloud-aws-sqs/src/main/java/io/awspring/cloud/sqs/listener/AsyncAdapterBlockingExecutionFailedException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.sqs.listener; 17 | 18 | /** 19 | * Exception representing a failure on an execution attempted by a blocking adapter. 20 | * @author Tomaz Fernandes 21 | * @since 3.0 22 | * @see io.awspring.cloud.sqs.listener.AsyncComponentAdapters 23 | */ 24 | public class AsyncAdapterBlockingExecutionFailedException extends RuntimeException { 25 | 26 | /** 27 | * Create an instance with the provided error message and cause. 28 | * @param errorMessage the error message. 29 | * @param cause the cause. 30 | */ 31 | public AsyncAdapterBlockingExecutionFailedException(String errorMessage, Throwable cause) { 32 | super(errorMessage, cause); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /spring-cloud-aws-sqs/src/main/java/io/awspring/cloud/sqs/listener/ConfigurableContainerComponent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.sqs.listener; 17 | 18 | /** 19 | * Representation of a {@link MessageListenerContainer} component that can be configured using a 20 | * {@link ContainerOptions} instance. 21 | * 22 | * @author Tomaz Fernandes 23 | * @since 3.0 24 | */ 25 | public interface ConfigurableContainerComponent { 26 | 27 | /** 28 | * Configure the component with the provided {@link ContainerOptions} instance 29 | * @param containerOptions 30 | */ 31 | default void configure(ContainerOptions containerOptions) { 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /spring-cloud-aws-sqs/src/main/java/io/awspring/cloud/sqs/listener/IdentifiableContainerComponent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.sqs.listener; 17 | 18 | /** 19 | * Representation of a component that can be assigned an id. 20 | * 21 | * @author Tomaz Fernandes 22 | * @since 3.0 23 | */ 24 | public interface IdentifiableContainerComponent { 25 | 26 | /** 27 | * Set the component id. 28 | * @param id the id. 29 | */ 30 | void setId(String id); 31 | 32 | /** 33 | * Get the component id. 34 | * @return the id. 35 | */ 36 | String getId(); 37 | 38 | } 39 | -------------------------------------------------------------------------------- /spring-cloud-aws-sqs/src/main/java/io/awspring/cloud/sqs/listener/ListenerMode.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.sqs.listener; 17 | 18 | /** 19 | * Configure the delivery strategy to be used by a {@link MessageListenerContainer}. 20 | * 21 | * @author Tomaz Fernandes 22 | * @since 3.0 23 | * @see io.awspring.cloud.sqs.listener.sink.FanOutMessageSink 24 | * @see io.awspring.cloud.sqs.listener.sink.OrderedMessageSink 25 | * @see io.awspring.cloud.sqs.listener.sink.BatchMessageSink 26 | */ 27 | public enum ListenerMode { 28 | 29 | /** 30 | * Configure the container to receive one message at a time in its components. 31 | */ 32 | SINGLE_MESSAGE, 33 | 34 | /** 35 | * Configure the container to receive the whole batch of messages in its components. 36 | */ 37 | BATCH 38 | 39 | } 40 | -------------------------------------------------------------------------------- /spring-cloud-aws-sqs/src/main/java/io/awspring/cloud/sqs/listener/MessageListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.sqs.listener; 17 | 18 | import java.util.Collection; 19 | import org.springframework.messaging.Message; 20 | 21 | /** 22 | * Interface to process incoming {@link Message}s. 23 | * 24 | * @param the {@link Message} payload type. 25 | * 26 | * @author Tomaz Fernandes 27 | * @since 3.0 28 | */ 29 | @FunctionalInterface 30 | public interface MessageListener { 31 | 32 | void onMessage(Message message); 33 | 34 | default void onMessage(Collection> messages) { 35 | throw new UnsupportedOperationException("Batch not implemented by this MessageListener"); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /spring-cloud-aws-sqs/src/main/java/io/awspring/cloud/sqs/listener/ObservableComponent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2025 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.sqs.listener; 17 | 18 | import io.awspring.cloud.sqs.support.observation.AbstractListenerObservation; 19 | 20 | /** 21 | * Represents a {@link AbstractPipelineMessageListenerContainer} component that can be observed. 22 | * 23 | * @author Tomaz Fernandes 24 | * @since 3.4 25 | */ 26 | public interface ObservableComponent { 27 | 28 | /** 29 | * Set the Observation-related instances that are specific to a messaging system. 30 | * @param observationSpecifics the observation-related instances. 31 | */ 32 | void setObservationSpecifics(AbstractListenerObservation.Specifics observationSpecifics); 33 | 34 | } 35 | -------------------------------------------------------------------------------- /spring-cloud-aws-sqs/src/main/java/io/awspring/cloud/sqs/listener/QueueAttributesAware.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.sqs.listener; 17 | 18 | /** 19 | * Implementations are enabled to receive a {@link QueueAttributes} instance. 20 | * 21 | * @author Tomaz Fernandes 22 | * @since 3.0 23 | */ 24 | public interface QueueAttributesAware { 25 | 26 | /** 27 | * Set the {@link QueueAttributes} instance. 28 | * @param queueAttributes the instance. 29 | */ 30 | void setQueueAttributes(QueueAttributes queueAttributes); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /spring-cloud-aws-sqs/src/main/java/io/awspring/cloud/sqs/listener/QueueNotFoundStrategy.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.sqs.listener; 17 | 18 | /** 19 | * Configure the strategy to be used when a specified queue is not found at container startup. 20 | * @author Tomaz Fernandes 21 | * @since 3.0 22 | * @see SqsContainerOptions#getQueueNotFoundStrategy() 23 | */ 24 | public enum QueueNotFoundStrategy { 25 | 26 | /** 27 | * Throw an exception and stop application startup if a queue is not found. 28 | */ 29 | FAIL, 30 | 31 | /** 32 | * Create queues that are not found at startup. Mind that in production environments the application might not have 33 | * permissions to create the queue and throw an exception. 34 | */ 35 | CREATE 36 | 37 | } 38 | -------------------------------------------------------------------------------- /spring-cloud-aws-sqs/src/main/java/io/awspring/cloud/sqs/listener/SqsAsyncClientAware.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.sqs.listener; 17 | 18 | import software.amazon.awssdk.services.sqs.SqsAsyncClient; 19 | 20 | /** 21 | * Implementations are enabled to receive a {@link SqsAsyncClient} instance. 22 | * 23 | * @author Tomaz Fernandes 24 | * @since 3.0 25 | */ 26 | public interface SqsAsyncClientAware { 27 | 28 | /** 29 | * Set the {@link SqsAsyncClient} instance. 30 | * @param sqsAsyncClient the instance. 31 | */ 32 | void setSqsAsyncClient(SqsAsyncClient sqsAsyncClient); 33 | 34 | } 35 | -------------------------------------------------------------------------------- /spring-cloud-aws-sqs/src/main/java/io/awspring/cloud/sqs/listener/TaskExecutorAware.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.sqs.listener; 17 | 18 | import org.springframework.core.task.TaskExecutor; 19 | 20 | /** 21 | * Enables a class to receive a container managed {@link TaskExecutor}. 22 | * 23 | * @author Tomaz Fernandes 24 | * @since 3.0 25 | */ 26 | public interface TaskExecutorAware { 27 | 28 | /** 29 | * Set the task executor. 30 | * @param taskExecutor the task executor. 31 | */ 32 | void setTaskExecutor(TaskExecutor taskExecutor); 33 | 34 | } 35 | -------------------------------------------------------------------------------- /spring-cloud-aws-sqs/src/main/java/io/awspring/cloud/sqs/listener/acknowledgement/AcknowledgementExecutor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.sqs.listener.acknowledgement; 17 | 18 | import java.util.Collection; 19 | import java.util.concurrent.CompletableFuture; 20 | import org.springframework.messaging.Message; 21 | 22 | /** 23 | * Allows executing acknowledgements for a batch of messages. 24 | * 25 | * @author Tomaz Fernandes 26 | * @since 3.0 27 | * @see ExecutingAcknowledgementProcessor 28 | */ 29 | @FunctionalInterface 30 | public interface AcknowledgementExecutor { 31 | 32 | /** 33 | * Executes acknowledgements for the provided batch of messages. 34 | * @param messages the messages. 35 | * @return a completable future. 36 | */ 37 | CompletableFuture execute(Collection> messages); 38 | 39 | } 40 | -------------------------------------------------------------------------------- /spring-cloud-aws-sqs/src/main/java/io/awspring/cloud/sqs/listener/acknowledgement/AcknowledgementResultCallbackException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.sqs.listener.acknowledgement; 17 | 18 | /** 19 | * Exception representing a failure to execute a {@link AcknowledgementResultCallback}. 20 | * 21 | * @author Tomaz Fernandes 22 | * @since 3.0 23 | */ 24 | public class AcknowledgementResultCallbackException extends RuntimeException { 25 | 26 | /** 27 | * Create an instance with the supplied message and cause. 28 | * @param errorMessage the error message. 29 | * @param cause the cause. 30 | */ 31 | public AcknowledgementResultCallbackException(String errorMessage, Throwable cause) { 32 | super(errorMessage, cause); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /spring-cloud-aws-sqs/src/main/java/io/awspring/cloud/sqs/listener/acknowledgement/handler/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Strategies for handling acknowledgements after successful and / or failed message processing. 19 | */ 20 | @org.springframework.lang.NonNullApi 21 | @org.springframework.lang.NonNullFields 22 | package io.awspring.cloud.sqs.listener.acknowledgement.handler; 23 | -------------------------------------------------------------------------------- /spring-cloud-aws-sqs/src/main/java/io/awspring/cloud/sqs/listener/acknowledgement/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Components to process message acknowledgements. 19 | */ 20 | @org.springframework.lang.NonNullApi 21 | @org.springframework.lang.NonNullFields 22 | package io.awspring.cloud.sqs.listener.acknowledgement; 23 | -------------------------------------------------------------------------------- /spring-cloud-aws-sqs/src/main/java/io/awspring/cloud/sqs/listener/adapter/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Adapters for invoking a message listener registered by a listener annotation. 19 | */ 20 | @org.springframework.lang.NonNullApi 21 | @org.springframework.lang.NonNullFields 22 | package io.awspring.cloud.sqs.listener.adapter; 23 | -------------------------------------------------------------------------------- /spring-cloud-aws-sqs/src/main/java/io/awspring/cloud/sqs/listener/errorhandler/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Components for handling errors and potentially recovering messages. 19 | */ 20 | @org.springframework.lang.NonNullApi 21 | @org.springframework.lang.NonNullFields 22 | package io.awspring.cloud.sqs.listener.errorhandler; 23 | -------------------------------------------------------------------------------- /spring-cloud-aws-sqs/src/main/java/io/awspring/cloud/sqs/listener/interceptor/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Components for intercepting messages before or after processing. 19 | */ 20 | @org.springframework.lang.NonNullApi 21 | @org.springframework.lang.NonNullFields 22 | package io.awspring.cloud.sqs.listener.interceptor; 23 | -------------------------------------------------------------------------------- /spring-cloud-aws-sqs/src/main/java/io/awspring/cloud/sqs/listener/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Components for executing the flow of messages to and from a message listener. 19 | */ 20 | @org.springframework.lang.NonNullApi 21 | @org.springframework.lang.NonNullFields 22 | package io.awspring.cloud.sqs.listener; 23 | -------------------------------------------------------------------------------- /spring-cloud-aws-sqs/src/main/java/io/awspring/cloud/sqs/listener/pipeline/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Pipeline abstraction to process messages in a container. 19 | */ 20 | @org.springframework.lang.NonNullApi 21 | @org.springframework.lang.NonNullFields 22 | package io.awspring.cloud.sqs.listener.pipeline; 23 | -------------------------------------------------------------------------------- /spring-cloud-aws-sqs/src/main/java/io/awspring/cloud/sqs/listener/sink/adapter/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Composable message sink adapters to add behavior to sinks via a decorator pattern. 19 | */ 20 | @org.springframework.lang.NonNullApi 21 | @org.springframework.lang.NonNullFields 22 | package io.awspring.cloud.sqs.listener.sink.adapter; 23 | -------------------------------------------------------------------------------- /spring-cloud-aws-sqs/src/main/java/io/awspring/cloud/sqs/listener/sink/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Components to handle the flow of messages from a Source to a Pipeline. 19 | */ 20 | @org.springframework.lang.NonNullApi 21 | @org.springframework.lang.NonNullFields 22 | package io.awspring.cloud.sqs.listener.sink; 23 | -------------------------------------------------------------------------------- /spring-cloud-aws-sqs/src/main/java/io/awspring/cloud/sqs/listener/source/FifoSqsMessageSource.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.sqs.listener.source; 17 | 18 | import java.util.UUID; 19 | import software.amazon.awssdk.services.sqs.model.ReceiveMessageRequest; 20 | 21 | /** 22 | * {@link AbstractSqsMessageSource} implementation for FIFO queues. 23 | * @author Tomaz Fernandes 24 | * @since 3.0 25 | */ 26 | public class FifoSqsMessageSource extends AbstractSqsMessageSource { 27 | 28 | @Override 29 | protected void customizeRequest(ReceiveMessageRequest.Builder builder) { 30 | builder.receiveRequestAttemptId(UUID.randomUUID().toString()); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /spring-cloud-aws-sqs/src/main/java/io/awspring/cloud/sqs/listener/source/StandardSqsMessageSource.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.sqs.listener.source; 17 | 18 | /** 19 | * {@link AbstractSqsMessageSource} implementation for standard queues. 20 | * @author Tomaz Fernandes 21 | * @since 3.0 22 | */ 23 | public class StandardSqsMessageSource extends AbstractSqsMessageSource { 24 | } 25 | -------------------------------------------------------------------------------- /spring-cloud-aws-sqs/src/main/java/io/awspring/cloud/sqs/listener/source/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Components that provide message instances to be processed. 19 | */ 20 | @org.springframework.lang.NonNullApi 21 | @org.springframework.lang.NonNullFields 22 | package io.awspring.cloud.sqs.listener.source; 23 | -------------------------------------------------------------------------------- /spring-cloud-aws-sqs/src/main/java/io/awspring/cloud/sqs/operations/SendBatchFailureHandlingStrategy.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.sqs.operations; 17 | 18 | /** 19 | * The strategy to use when handling a send batch operation that has at least one failed message. 20 | * 21 | * @author Tomaz Fernandes 22 | * @since 3.0 23 | */ 24 | public enum SendBatchFailureHandlingStrategy { 25 | 26 | /** 27 | * Throw a {@link SendBatchOperationFailedException} containing a {@link SendResult.Batch} object. This is the 28 | * default strategy. 29 | */ 30 | THROW, 31 | 32 | /** 33 | * Do not throw an exception and return the {@link SendResult.Batch} object directly. 34 | */ 35 | DO_NOT_THROW 36 | 37 | } 38 | -------------------------------------------------------------------------------- /spring-cloud-aws-sqs/src/main/java/io/awspring/cloud/sqs/operations/TemplateContentBasedDeduplication.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2023 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.sqs.operations; 17 | 18 | /** 19 | * The ContentBasedDeduplication queue attribute value to be used by the {@link SqsTemplate} when sending messages to a 20 | * FIFO queue. 21 | * 22 | * @author Zhong Xi Lu 23 | * @since 3.0.4 24 | */ 25 | public enum TemplateContentBasedDeduplication { 26 | 27 | /** 28 | * The ContentBasedDeduplication queue attribute value will be resolved automatically at runtime. 29 | */ 30 | AUTO, 31 | 32 | /** 33 | * ContentBasedDeduplication is enabled on all FIFO SQS queues. 34 | */ 35 | ENABLED, 36 | 37 | /** 38 | * ContentBasedDeduplication is disabled on all FIFO SQS queues. 39 | */ 40 | DISABLED 41 | } 42 | -------------------------------------------------------------------------------- /spring-cloud-aws-sqs/src/main/java/io/awspring/cloud/sqs/operations/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Components for converting source messages to Spring messaging messages. 19 | */ 20 | @org.springframework.lang.NonNullApi 21 | @org.springframework.lang.NonNullFields 22 | package io.awspring.cloud.sqs.operations; 23 | -------------------------------------------------------------------------------- /spring-cloud-aws-sqs/src/main/java/io/awspring/cloud/sqs/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * SQS integration for Spring Cloud AWS. 19 | */ 20 | @org.springframework.lang.NonNullApi 21 | @org.springframework.lang.NonNullFields 22 | package io.awspring.cloud.sqs; 23 | -------------------------------------------------------------------------------- /spring-cloud-aws-sqs/src/main/java/io/awspring/cloud/sqs/support/converter/ContextAwareHeaderMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.sqs.support.converter; 17 | 18 | import org.springframework.messaging.MessageHeaders; 19 | 20 | /** 21 | * A {@link HeaderMapper} specialization that supports receiving a {@link MessageConversionContext} for mapping context 22 | * dependent headers. 23 | * @author Tomaz Fernandes 24 | * @since 3.0 25 | * @see ContextAwareMessagingMessageConverter 26 | */ 27 | public interface ContextAwareHeaderMapper extends HeaderMapper { 28 | 29 | MessageHeaders createContextHeaders(S source, MessageConversionContext context); 30 | 31 | } 32 | -------------------------------------------------------------------------------- /spring-cloud-aws-sqs/src/main/java/io/awspring/cloud/sqs/support/converter/MessageConversionContext.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.sqs.support.converter; 17 | 18 | import org.springframework.lang.Nullable; 19 | 20 | /** 21 | * Marker interface for a message conversion context. 22 | * @author Tomaz Fernandes 23 | * @since 3.0 24 | * @see ContextAwareMessagingMessageConverter 25 | * @see ContextAwareHeaderMapper 26 | */ 27 | public interface MessageConversionContext { 28 | 29 | /** 30 | * An optional parameter with the payload class to be used by the conversion process. 31 | * @return the payload class. 32 | */ 33 | @Nullable 34 | Class getPayloadClass(); 35 | 36 | } 37 | -------------------------------------------------------------------------------- /spring-cloud-aws-sqs/src/main/java/io/awspring/cloud/sqs/support/converter/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Components for converting source messages to Spring messaging messages. 19 | */ 20 | @org.springframework.lang.NonNullApi 21 | @org.springframework.lang.NonNullFields 22 | package io.awspring.cloud.sqs.support.converter; 23 | -------------------------------------------------------------------------------- /spring-cloud-aws-sqs/src/main/java/io/awspring/cloud/sqs/support/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Auto-configuration for Amazon SQS (Simple Queue Service) integrations. 19 | */ 20 | @org.springframework.lang.NonNullApi 21 | @org.springframework.lang.NonNullFields 22 | package io.awspring.cloud.sqs.support; 23 | -------------------------------------------------------------------------------- /spring-cloud-aws-sqs/src/main/java/io/awspring/cloud/sqs/support/resolver/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Components for resolving method arguments in listener methods. 19 | */ 20 | @org.springframework.lang.NonNullApi 21 | @org.springframework.lang.NonNullFields 22 | package io.awspring.cloud.sqs.support.resolver; 23 | -------------------------------------------------------------------------------- /spring-cloud-aws-sqs/src/test/resources/junit-platform.properties: -------------------------------------------------------------------------------- 1 | junit.jupiter.execution.parallel.enabled = true 2 | junit.jupiter.execution.parallel.mode.classes.default = concurrent 3 | junit.jupiter.execution.parallel.mode.default = concurrent 4 | -------------------------------------------------------------------------------- /spring-cloud-aws-sqs/src/test/resources/notificationMessage.json: -------------------------------------------------------------------------------- 1 | { 2 | "Type": "Notification", 3 | "Subject": "IntegrationTestSubject", 4 | "MessageId": "f2c15fec-c617-5b08-b54d-13c4099fec60", 5 | "TopicArn": "arn:aws:sns:eu-west-1:111111111111:mySampleTopic", 6 | "Message": "{\"specversion\": \"1.0.2\", \"data\": {\"firstField\":\"pojoNotificationMessage\",\"secondField\":\"secondValue\"}}", 7 | "Timestamp": "2014-06-28T14:12:24.418Z", 8 | "SignatureVersion": "1", 9 | "Signature": "XDvKSAnhxECrAmyIrs0Dsfbp/tnKD1IvoOOYTU28FtbUoxr/CgziuW87yZwTuSNNbHJbdD3BEjHS0vKewm0xBeQ0PToDkgtoORXo5RWnmShDQ2nhkthFhZnNulKtmFtRogjBtCwbz8sPnbOCSk21ruyXNdV2RUbdDalndAW002CWEQmYMxFSN6OXUtMueuT610aX+tqeYP4Z6+8WTWLWjAuVyy7rOI6KHYBcVDhKtskvTOPZ4tiVohtQdQbO2Gjuh1vblRzzwMkfaoFTSWImd4pFXxEsv/fq9aGIlqq9xEryJ0w2huFwI5gxyhvGt0RnTd9YvmAEC+WzdJDOqaDNxg==", 10 | "SigningCertURL": "https://sns.eu-west-1.amazonaws.com/SimpleNotificationService-e372f8ca30337fdb084e8ac449342c77.pem", 11 | "UnsubscribeURL": "https://sns.eu-west-1.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=arn:aws:sns:eu-west-1:721324560415:mySampleTopic:9859a6c9-6083-4690-ab02-d1aead3442df" 12 | } 13 | -------------------------------------------------------------------------------- /spring-cloud-aws-starters/spring-cloud-aws-starter-dynamodb/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | spring-cloud-aws 7 | io.awspring.cloud 8 | 3.4.0-SNAPSHOT 9 | ../../pom.xml 10 | 11 | 4.0.0 12 | 13 | Spring Cloud AWS DynamoDb Starter 14 | spring-cloud-aws-starter-dynamodb 15 | 16 | 17 | 18 | io.awspring.cloud 19 | spring-cloud-aws-dynamodb 20 | 21 | 22 | io.awspring.cloud 23 | spring-cloud-aws-starter 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /spring-cloud-aws-starters/spring-cloud-aws-starter-imds/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | spring-cloud-aws 7 | io.awspring.cloud 8 | 3.1.0-SNAPSHOT 9 | ../../pom.xml 10 | 11 | 4.0.0 12 | 13 | Spring Cloud IMDS Starter 14 | spring-cloud-aws-starter-imds 15 | 16 | 17 | 18 | io.awspring.cloud 19 | spring-cloud-aws-starter 20 | 21 | 22 | software.amazon.awssdk 23 | imds 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /spring-cloud-aws-starters/spring-cloud-aws-starter-parameter-store/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | spring-cloud-aws 7 | io.awspring.cloud 8 | 3.4.0-SNAPSHOT 9 | ../../pom.xml 10 | 11 | 4.0.0 12 | 13 | spring-cloud-aws-starter-parameter-store 14 | Spring Cloud AWS Parameter Store Starter 15 | 16 | 17 | 18 | io.awspring.cloud 19 | spring-cloud-aws-parameter-store 20 | 21 | 22 | io.awspring.cloud 23 | spring-cloud-aws-starter 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /spring-cloud-aws-starters/spring-cloud-aws-starter-s3/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | spring-cloud-aws 7 | io.awspring.cloud 8 | 3.4.0-SNAPSHOT 9 | ../../pom.xml 10 | 11 | 4.0.0 12 | 13 | spring-cloud-aws-starter-s3 14 | Spring Cloud AWS S3 Starter 15 | 16 | 17 | 18 | io.awspring.cloud 19 | spring-cloud-aws-s3 20 | 21 | 22 | io.awspring.cloud 23 | spring-cloud-aws-starter 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /spring-cloud-aws-starters/spring-cloud-aws-starter-secrets-manager/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | spring-cloud-aws 7 | io.awspring.cloud 8 | 3.4.0-SNAPSHOT 9 | ../../pom.xml 10 | 11 | 4.0.0 12 | 13 | spring-cloud-aws-starter-secrets-manager 14 | Spring Cloud AWS Secrets Manager Starter 15 | 16 | 17 | 18 | io.awspring.cloud 19 | spring-cloud-aws-secrets-manager 20 | 21 | 22 | io.awspring.cloud 23 | spring-cloud-aws-starter 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /spring-cloud-aws-starters/spring-cloud-aws-starter-ses/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | spring-cloud-aws 7 | io.awspring.cloud 8 | 3.4.0-SNAPSHOT 9 | ../../pom.xml 10 | 11 | 4.0.0 12 | 13 | spring-cloud-aws-starter-ses 14 | Spring Cloud AWS SES Starter 15 | Spring Cloud AWS SES Starter 16 | 17 | 18 | 19 | io.awspring.cloud 20 | spring-cloud-aws-ses 21 | 22 | 23 | io.awspring.cloud 24 | spring-cloud-aws-starter 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /spring-cloud-aws-starters/spring-cloud-aws-starter-sns/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | spring-cloud-aws 8 | io.awspring.cloud 9 | 3.4.0-SNAPSHOT 10 | ../../pom.xml 11 | 12 | 13 | 4.0.0 14 | 15 | spring-cloud-aws-starter-sns 16 | Spring Cloud AWS SNS Starter 17 | Spring Cloud AWS Simple Notification Service Starter 18 | 19 | 20 | 21 | io.awspring.cloud 22 | spring-cloud-aws-starter 23 | 24 | 25 | 26 | io.awspring.cloud 27 | spring-cloud-aws-sns 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /spring-cloud-aws-starters/spring-cloud-aws-starter-sqs/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | spring-cloud-aws 8 | io.awspring.cloud 9 | 3.4.0-SNAPSHOT 10 | ../../pom.xml 11 | 12 | 13 | 4.0.0 14 | 15 | spring-cloud-aws-starter-sqs 16 | Spring Cloud AWS SQS Starter 17 | Spring Cloud AWS Simple Queue Service Starter 18 | 19 | 20 | 21 | io.awspring.cloud 22 | spring-cloud-aws-starter 23 | 24 | 25 | io.awspring.cloud 26 | spring-cloud-aws-sqs 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /spring-cloud-aws-starters/spring-cloud-aws-starter/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | spring-cloud-aws 7 | io.awspring.cloud 8 | 3.4.0-SNAPSHOT 9 | ../../pom.xml 10 | 11 | 4.0.0 12 | 13 | spring-cloud-aws-starter 14 | Spring Cloud AWS Starter 15 | 16 | 17 | 18 | io.awspring.cloud 19 | spring-cloud-aws-autoconfigure 20 | 21 | 22 | io.awspring.cloud 23 | spring-cloud-aws-core 24 | 25 | 26 | org.springframework.boot 27 | spring-boot-starter 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /spring-cloud-aws-test/src/main/resources/META-INF/spring/io.awspring.cloud.test.sqs.AutoConfigureSqs.imports: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration 2 | io.awspring.cloud.autoconfigure.sqs.SqsAutoConfiguration 3 | io.awspring.cloud.autoconfigure.core.AwsAutoConfiguration 4 | io.awspring.cloud.autoconfigure.core.RegionProviderAutoConfiguration 5 | io.awspring.cloud.autoconfigure.core.CredentialsProviderAutoConfiguration 6 | -------------------------------------------------------------------------------- /spring-cloud-aws-test/src/test/java/io/awspring/cloud/test/sqs/SampleComponent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.test.sqs; 17 | 18 | import org.springframework.stereotype.Component; 19 | 20 | @Component 21 | class SampleComponent { 22 | 23 | void save(String message) { 24 | 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /spring-cloud-aws-test/src/test/java/io/awspring/cloud/test/sqs/SqsSampleListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.test.sqs; 17 | 18 | import io.awspring.cloud.sqs.annotation.SqsListener; 19 | import org.springframework.stereotype.Component; 20 | 21 | @Component 22 | class SqsSampleListener { 23 | 24 | static final String QUEUE_NAME = "my-queue"; 25 | 26 | private final SampleComponent sampleComponent; 27 | 28 | SqsSampleListener(SampleComponent sampleComponent) { 29 | this.sampleComponent = sampleComponent; 30 | } 31 | 32 | @SqsListener(QUEUE_NAME) 33 | void handle(String message) { 34 | sampleComponent.save(message); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /spring-cloud-aws-test/src/test/java/io/awspring/cloud/test/sqs/SqsTestApplication.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2022 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.test.sqs; 17 | 18 | import org.springframework.boot.SpringApplication; 19 | import org.springframework.boot.autoconfigure.SpringBootApplication; 20 | 21 | @SpringBootApplication 22 | public class SqsTestApplication { 23 | 24 | public static void main(String[] args) { 25 | SpringApplication.run(SqsTestApplication.class, args); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /spring-cloud-aws-test/src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /spring-cloud-aws-testcontainers/src/main/java/io/awspring/cloud/testcontainers/AwsClientFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2013-2024 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.awspring.cloud.testcontainers; 17 | 18 | import software.amazon.awssdk.awscore.client.builder.AwsClientBuilder; 19 | 20 | /** 21 | * Provides convenient way to construct AWS SDK clients. 22 | * 23 | * @author Maciej Walkowiak 24 | * @since 3.2.0 25 | */ 26 | public interface AwsClientFactory { 27 | > CLIENT create(BUILDER builder); 28 | } 29 | -------------------------------------------------------------------------------- /spring-cloud-aws-testcontainers/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | org.springframework.boot.autoconfigure.service.connection.ConnectionDetailsFactory=\ 2 | io.awspring.cloud.testcontainers.AwsContainerConnectionDetailsFactory 3 | -------------------------------------------------------------------------------- /spring-cloud-aws-testcontainers/src/test/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | --------------------------------------------------------------------------------