I want to run k6 tests in our CICD pipelines. The pipeline runners are on AWS and use AWS instance profiles. How can I create an AWSConfig object if I don't have access keys and secrets to pass it?
I was really surprised that jslib-aws is not based on the AWS SDK, which automatically handles authentication for you. https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-credentials-node.html
If more than one credential source is available to the SDK, the default precedence of selection is as follows:
- Credentials that are explicitly set through the service-client constructor
- Environment variables
- The shared credentials file
- Credentials loaded from the ECS credentials provider (if applicable)
- Credentials that are obtained by using a credential process specified in the shared AWS config file or the shared credentials file. For more information, see Loading Credentials in Node.js using a Configured Credential Process.
- Credentials loaded from AWS IAM using the credentials provider of the Amazon EC2 instance (if configured in the instance metadata)
I'm using number 6.
I want to run k6 tests in our CICD pipelines. The pipeline runners are on AWS and use AWS instance profiles. How can I create an AWSConfig object if I don't have access keys and secrets to pass it?
I was really surprised that jslib-aws is not based on the AWS SDK, which automatically handles authentication for you. https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-credentials-node.html
I'm using number 6.