From f01799663928ce20fbbc8696ecf70ffb3399be05 Mon Sep 17 00:00:00 2001 From: Rodrigue Koffi Date: Thu, 22 Jun 2023 13:49:04 +0200 Subject: [PATCH] fix: Extend temporary key duration (#15) * Extend temporary key duration * Update doc --- README.md | 4 ++++ internal/pkg/aws/aws.go | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9832d52..b4fef30 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,10 @@ Build from latest release. This requires Go installed on your environement. go install github.com/aws-observability/amazon-managed-grafana-migrator@latest ``` +This command above will build the binary into your Go path `($HOME/go/bin)`. +Make sure to add your Go bin in your $PATH to run the command. +For Linux, this is usually `export PATH=$PATH:$HOME/go/bin`. + You can also download the pre-compiled binary for your OS and CPU architecture from our [GitHub releases](https://github.com/aws-observability/amazon-managed-grafana-migrator/releases/latest). diff --git a/internal/pkg/aws/aws.go b/internal/pkg/aws/aws.go index 4299a98..48832ee 100644 --- a/internal/pkg/aws/aws.go +++ b/internal/pkg/aws/aws.go @@ -81,7 +81,7 @@ func (a *AMG) CreateWorkspaceApiKey(workspaceID string) (AMGApiKey, error) { log.Debug("Creating temporary API key for ", workspaceID) - duration := time.Duration(5 * 60 * time.Second) + duration := time.Duration(30 * 60 * time.Second) resp, err := a.Client.CreateWorkspaceApiKey(&managedgrafana.CreateWorkspaceApiKeyInput{ KeyName: aws.String(keyName), KeyRole: aws.String("ADMIN"),