@@ -97,7 +97,14 @@ func ConfigureDotEnvCommand(a *App) {
9797}
9898
9999func (c * DotEnvCommand ) initSsmClient () {
100- awsSession , err := session .NewSession ()
100+ awsConfig := & aws.Config {
101+ LogLevel : aws .LogLevel (aws .LogOff ),
102+ }
103+
104+ if c .log .awsDebug {
105+ awsConfig .LogLevel = aws .LogLevel (aws .LogDebugWithHTTPBody )
106+ }
107+ awsSession , err := session .NewSession (awsConfig )
101108 c .log .must (err )
102109 c .ssm = ssm .New (awsSession )
103110}
@@ -193,6 +200,8 @@ func (c *DotEnvCommand) processDotEnv() error {
193200 }
194201 }
195202
203+ c .log .Debug ("uniqNames = %v" , len (uniqNames ))
204+
196205 if len (uniqNames ) == 0 {
197206 // Nothing to do, no SSM parameters.
198207 return nil
@@ -205,13 +214,18 @@ func (c *DotEnvCommand) processDotEnv() error {
205214 i ++
206215 }
207216
217+ c .log .Debug ("names = %v" , len (names ))
218+
208219 for i := 0 ; i < len (names ); i += c .batchSize {
209220 j := i + c .batchSize
210221 if j > len (names ) {
211222 j = len (names )
212223 }
213224
214- values , err := c .getParameters (names [i :j ], c .decrypt , ssmVars [i :j ])
225+ c .log .Debug ("Batch [%v-%v], names: %v, ssmVars: %v" , i , j , len (names [i :j ]), len (ssmVars [i :j ]))
226+
227+ values , err := c .getParameters (names [i :j ], c .decrypt , ssmVars )
228+ c .log .Debug ("Batch [%v-%v], values: %v" , i , j , len (values ))
215229 if err != nil {
216230 return err
217231 }
@@ -238,7 +252,11 @@ func (c *DotEnvCommand) getParameters(names []string, decrypt bool, ssmVars []ss
238252 input .Names = append (input .Names , aws .String (n ))
239253 }
240254
255+ c .log .Debug ("REQ: Batch [%v], input.Name: %v" , len (ssmVars ), len (input .Names ))
256+
241257 resp , err := c .ssm .GetParameters (input )
258+ c .log .Debug ("RESP: Batch [%v], resp.Parameters: %v" , len (ssmVars ), len (resp .Parameters ))
259+
242260 c .log .must (err )
243261
244262 for _ , v := range ssmVars {
0 commit comments