Comments
3 comments
- 
                
                   Hi @eko_joseph, Hi @eko_joseph,
 May I know whether below profile is included in your `.aws/config` file?
 [default]
 region = your_aws_region
 
- 
                
                   Yup. When we run aws configure, it creates a profile exactly like that, with a bit more information. We ran a code snippet to make sure our AWS SDK configuration was correct. Yup. When we run aws configure, it creates a profile exactly like that, with a bit more information. We ran a code snippet to make sure our AWS SDK configuration was correct.
 import com.amazonaws.regions.AwsProfileRegionProvider;
 public class Scratch {
 public static void main(String[] args) {
 System.out.println(new AwsProfileRegionProvider().getRegion());
 } }
 Execution of this program in our development environment results in "us-east-1." The developer still cannot run migrations that use AWS functionality in Flyway.
 
- 
                
                   Hi @eko_joseph, Hi @eko_joseph,
 Many thanks for the feedback.
 In the log, we see the debug message "Unable to load region from software.amazon.awssdk.regions.providers.AwsProfileRegionProvider@6bf28f61:No region provided in profile: default", which comes from the aws sdk.
 It looks like the AwsProfileRegionProvider cannot find the `default` sector in the config file, which is confusing.
 Can other parameters in the config file be loaded and applied properly?
Add comment
Please sign in to leave a comment.
[INFO] Flyway Community Edition 9.21.1 by Redgate
[INFO] See release notes here: https://rd.gt/416ObMi
[DEBUG] AWS SDK available: true
[DEBUG] Unable to load region from software.amazon.awssdk.regions.providers.SystemSettingsRegionProvider@3a5e4f32:Unable to load region from system settings. Region must be specified either via environment variable (AWS_REGION) or system property (aws.region).
[DEBUG] Unable to load region from software.amazon.awssdk.regions.providers.AwsProfileRegionProvider@6bf28f61:No region provided in profile: default
[DEBUG] Unable to load region from software.amazon.awssdk.regions.providers.InstanceProfileRegionProvider@50ecef36:Unable to contact EC2 metadata service.
[DEBUG] Unable to load config file: C:\Users\xxx\flyway.conf
[DEBUG] Unable to load config file: C:\work\trunk\ekotrope-migrations\flyway.conf
[DEBUG] Scanning for classpath resources at 'classpath:db/callback' ...
[DEBUG] Determining location urls for classpath:db/callback using ClassLoader ClassRealm[plugin>org.flywaydb:flyway-maven-plugin:9.21.1, parent: jdk.internal.loader.ClassLoaders$AppClassLoader@30946e09] ...
[DEBUG] Unable to resolve location classpath:db/callback.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13.886 s
[INFO] Finished at: 2024-02-15T14:16:55-05:00
Any help would be appreciated.
Joseph