How do we use the AWS assume role functionality with the upload-s3 Domo CLI command?

We have set up an AWS Role and AWS Profile to connect to an AWS S3 bucket. If we are using the upload-s3 Domo CLI command, how should we use the AssumeRole profile to connect, instead of passing a static access key and secret in the command line (upload-s3)?

Answers

  • LWalker
    LWalker Domo Employee

    To use the AWS Role and AWS Profile that you have set up to connect to an S3 bucket when using the upload-s3 Domo CLI command, you can follow these steps:

    1. Ensure that the AWS CLI is installed on your machine.
    2. Configure the AWS CLI by running the command aws configure --profile <your-profile-name>. This will prompt you to enter your AWS Access Key ID, Secret Access Key, Default region name, and Default output format. Make sure to enter the Access Key ID and Secret Access Key for the AWS Role that you want to assume.
    3. In the Domo CLI command, use the --aws-profile flag to specify the name of the AWS Profile that you configured in step 2. For example: domo upload-s3 --aws-profile <your-profile-name> <your-file-path> s3://<your-bucket-name>/<your-object-key>

    When you use the --aws-profile flag, the Domo CLI will use the credentials stored in the AWS Profile to assume the AWS Role that you have set up, rather than passing a static Access Key ID and Secret Access Key in the command line.

    Let me know if this helps.

  • Thanks for that, Lowell - we'll give it a go.