justtrackio / gosoline

Gosoline is our framework which fuels all of our Golang applications
MIT License
96 stars 50 forks source link

cloud/aws: unified default credentials config and added profile load option #1155

Closed j4k4 closed 2 months ago

j4k4 commented 2 months ago

unified default credentials config

before:

cloud:
  aws:
    credentials:
      access_key_id: "*******************"
      secret_access_key: "****************************************"
      session_token: "********************************************************************"
    defaults:
      region: "eu-central-1"
      endpoint: ""

after:

cloud:
  aws:
    defaults:
      credentials:
        access_key_id: "justtrack"
        secret_access_key: "justtrack"
        session_token: "justtrack"
      endpoint: "http://localhost:4566"
      region: "eu-central-1"

added option to gain access via aws profile

It's possible now to use sso credentials via profiles. This can be done via global default or client specific.

cloud:
  aws:
    defaults:
      profile: "sdlc-dev-account"
    cloudwatch:
      clients:
        default:
          profile: "sdlc-dev-account"

ref: https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/#specifying-profiles

EndpointResolver V1 deprecation

v1 of the endpoint resolver got deprecated and the code was migrated to use the v2. Resolving the endpoint has to be configured on client level in the code now. This change should be transparent for most of the gosoline use cases.\ ref: https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/endpoints/#customization