Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2438749

Browse files
committed
Merge branch 'validate-aws-credentials' into 'master'
fix: check AWS credentials and notify about missing environment variablesSee merge request postgres-ai/database-lab!130
2 parents2352410 +beb806d commit2438749

File tree

1 file changed

+8
-0
lines changed
  • pkg/retrieval/engine/postgres/initialize/logical

1 file changed

+8
-0
lines changed

‎pkg/retrieval/engine/postgres/initialize/logical/dump_rds.go‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,14 @@ func newRDSDumper(rdsCfg *RDSConfig) (*rdsDumper, error) {
6868
returnnil,errors.Wrap(err,"failed to start AWS session")
6969
}
7070

71+
credentials,err:=awsSession.Config.Credentials.Get()
72+
iferr!=nil||!credentials.HasKeys() {
73+
log.Dbg(err)
74+
75+
returnnil,errors.New(`failed to check AWS credentials.
76+
Set up valid environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY`)
77+
}
78+
7179
return&rdsDumper{
7280
rdsCfg:rdsCfg,
7381
iamSvc:iam.New(awsSession,aws.NewConfig()),

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp