Skip to content

Support for Credentials Provider #2343

Closed Answered by PrayAnalog
moreandres asked this question in Q&A
Discussion options

You must be logged in to vote

Finally, I can use Elasticache through IAM. Thanks.

I try to write IAMAuthTokenRequest like https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/auth-iam.html
And here's my code.

package elasticache

import (
	"context"
	"net/http"
	"net/url"
	"strconv"
	"strings"
	"time"

	"github.com/aws/aws-sdk-go-v2/aws"
	signer "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
)

const (
	REQUEST_PROTOCOL     = "http://"
	PARAM_ACTION         = "Action"
	PARAM_USER           = "User"
	ACTION_NAME          = "connect"
	SERVICE_NAME         = "elasticache"
	PARAM_EXPIRES        = "X-Amz-Expires"
	TOKEN_EXPIRY_SECONDS = 899

	EMPTY_BODY_SHA256 = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991…

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by monkey92t
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants