From 47630371b2c40e60c7d72dc1da32c8fd10aa2f79 Mon Sep 17 00:00:00 2001 From: Reed Loden Date: Tue, 16 Jan 2024 14:23:28 -0800 Subject: [PATCH] Remove TODOs related to use of FIPS endpoints with DynamoDB (#36160) Decided to keep the current code as-is, so removing the TODOs --- lib/backend/dynamo/dynamodbbk.go | 4 +--- lib/events/dynamoevents/dynamoevents.go | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/backend/dynamo/dynamodbbk.go b/lib/backend/dynamo/dynamodbbk.go index 819479dfa02c..3fa5d7db7636 100644 --- a/lib/backend/dynamo/dynamodbbk.go +++ b/lib/backend/dynamo/dynamodbbk.go @@ -281,13 +281,11 @@ func New(ctx context.Context, params backend.Params) (*Backend, error) { } b.session.Config.HTTPClient = httpClient - // create DynamoDB service: + // Create DynamoDB service. svc, err := dynamometrics.NewAPIMetrics(dynamometrics.Backend, dynamodb.New(b.session, &aws.Config{ // Setting this on the individual service instead of the session, as DynamoDB Streams // and Application Auto Scaling do not yet have FIPS endpoints in non-GovCloud. // See also: https://aws.amazon.com/compliance/fips/#FIPS_Endpoints_by_Service - // TODO(reed): This can be simplified once https://github.com/aws/aws-sdk-go/pull/5078 - // is available (or whenever AWS adds the missing FIPS endpoints). UseFIPSEndpoint: useFIPSEndpoint, })) if err != nil { diff --git a/lib/events/dynamoevents/dynamoevents.go b/lib/events/dynamoevents/dynamoevents.go index 4e6f7c61c728..770cf367eb6a 100644 --- a/lib/events/dynamoevents/dynamoevents.go +++ b/lib/events/dynamoevents/dynamoevents.go @@ -287,13 +287,11 @@ func New(ctx context.Context, cfg Config) (*Log, error) { return nil, trace.Wrap(err) } - // create DynamoDB service: + // Create DynamoDB service. svc, err := dynamometrics.NewAPIMetrics(dynamometrics.Events, dynamodb.New(b.session, &aws.Config{ // Setting this on the individual service instead of the session, as DynamoDB Streams // and Application Auto Scaling do not yet have FIPS endpoints in non-GovCloud. // See also: https://aws.amazon.com/compliance/fips/#FIPS_Endpoints_by_Service - // TODO(reed): This can be simplified once https://github.com/aws/aws-sdk-go/pull/5078 - // is available (or whenever AWS adds the missing FIPS endpoints). UseFIPSEndpoint: events.FIPSProtoStateToAWSState(cfg.UseFIPSEndpoint), })) if err != nil {