Skip to content

Instantly share code, notes, and snippets.

@yutakahashi114
Last active June 28, 2021 13:11
Show Gist options
  • Save yutakahashi114/9f58aedb19bfb4f8b1f2d2cc347a9428 to your computer and use it in GitHub Desktop.
Save yutakahashi114/9f58aedb19bfb4f8b1f2d2cc347a9428 to your computer and use it in GitHub Desktop.
var endpoint *string
cognitoEndpoint = os.Getenv("COGNITO_ENDPOINT")
if cognitoEndpoint != "" {
endpoint = aws.String(cognitoEndpoint)
}
client := cognitoidentityprovider.New(
session.Must(session.NewSessionWithOptions(session.Options{
Config: aws.Config{Endpoint: endpoint},
SharedConfigState: session.SharedConfigEnable,
})),
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment