Skip to content

Commit

Permalink
Remove TODOs related to use of FIPS endpoints with DynamoDB (#36160)
Browse files Browse the repository at this point in the history
Decided to keep the current code as-is, so removing the TODOs
  • Loading branch information
reedloden committed Jan 16, 2024
1 parent ecf7a79 commit 4763037
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions lib/backend/dynamo/dynamodbbk.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 1 addition & 3 deletions lib/events/dynamoevents/dynamoevents.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 4763037

Please sign in to comment.