Skip to content

Commit

Permalink
Ignore shared aws config not found error.
Browse files Browse the repository at this point in the history
  • Loading branch information
Joerger committed Oct 18, 2023
1 parent d44e452 commit 851b51e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/cloud/aws/imds.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ func WithIMDSClient(client *imds.Client) InstanceMetadataClientOption {
func NewInstanceMetadataClient(ctx context.Context, opts ...InstanceMetadataClientOption) (*InstanceMetadataClient, error) {
cfg, err := config.LoadDefaultConfig(ctx)
if err != nil {
if _, ok := err.(config.SharedConfigProfileNotExistError); ok {
return nil, trace.NotFound(err.Error())
}
return nil, trace.Wrap(err)
}

Expand Down

0 comments on commit 851b51e

Please sign in to comment.