CircleCI-Public / aws-cli-orb

Install and configure the AWS command-line interface (awscli)
https://circleci.com/orbs/registry/orb/circleci/aws-cli
MIT License
57 stars 51 forks source link

OICD AWS Provider - Old AWS orb version not consistent with > 4.0 version causing issues with AWS Credentials configuration #191

Closed nastymajestic closed 2 months ago

nastymajestic commented 9 months ago

Locations

https://circleci.com/docs/openid-connect-tokens/#authenticate-jobs-with-cloud-providers

Details

Old version of AWS orb "circleci/aws-cli@4.0" current is 4.1.2 yet reference to >4.0 causing issues with configuration. Also not updated documentation to the latest version: https://circleci.com/docs/openid-connect-tokens/#authenticate-jobs-with-cloud-providers (documentation based on circleci/aws-cli@3.1.5)

Docu of version 4.1.2 is also not updated and it's showing examples on 4.0 orbs version.

Comparision of version 4.0.0 vs 4.1.2 - https://github.com/CircleCI-Public/aws-cli-orb/compare/v4.0.0...v4.1.2

AWS Cloud provider setup of OICD Roles

version: 2.1

orbs:
  aws-cli: circleci/aws-cli@3.1.5
jobs:
  aws-example:
    environment:
      AWS_REGION: us-west-1
    docker:
      - image: cimg/aws:2023.06
    steps:
      - checkout
      # run the aws-cli/setup command from the orb
      - aws-cli/setup:
          role-arn: "arn:aws:iam::123456789012:role/OIDC-ROLE"
          aws-region: ${AWS_REGION}
          # optional parameters
          profile-name: "OIDC-PROFILE"
          role-session-name: "example-session"
          session-duration: "1800"

Changes in parameters version >4.0 - dashes changed to underlines:

version: '2.1'
orbs:
  aws-cli: circleci/aws-cli@4.0
jobs:
  aws-cli-example:
    executor: aws-cli/default
    steps:
      - checkout
      - aws-cli/setup:
          profile_name: WEB IDENTITY PROFILE
          role_arn: arn:aws:iam::123456789012:role/WEB-IDENTITY-ROLE
          role_session_name: example-session
      - run: echo "Run your code here"
workflows:
  aws-cli:
    jobs:
      - aws-cli-example:
          context: aws

Lack of documentation of setting up job with the latest version of orb.

Extra evidence like build output or other links https://circleci.com/developer/orbs/orb/circleci/aws-cli?version=4.1.2 https://circleci.com/docs/openid-connect-tokens/#aws

marboledacci commented 2 months ago

The examples are updated to the newer version in version 5.1