diff --git a/academy/connect-connect-aws-s3-sink/s3-sink-repro-000001-stackoverflowerror-with-s3-sink-connector.sh b/academy/connect-connect-aws-s3-sink/s3-sink-repro-000001-stackoverflowerror-with-s3-sink-connector.sh index 7b0c4e46b..ca80e5b7f 100755 --- a/academy/connect-connect-aws-s3-sink/s3-sink-repro-000001-stackoverflowerror-with-s3-sink-connector.sh +++ b/academy/connect-connect-aws-s3-sink/s3-sink-repro-000001-stackoverflowerror-with-s3-sink-connector.sh @@ -20,8 +20,8 @@ else if [ -f $HOME/.aws/credentials ] then logwarn "💭 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set based on $HOME/.aws/credentials" - export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) - export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) + export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) + export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) fi fi if [ -z "$AWS_REGION" ] diff --git a/ccloud/connect-aws-kinesis-source/kinesis.sh b/ccloud/connect-aws-kinesis-source/kinesis.sh index 55ecbc1ae..b01d41af5 100755 --- a/ccloud/connect-aws-kinesis-source/kinesis.sh +++ b/ccloud/connect-aws-kinesis-source/kinesis.sh @@ -24,8 +24,8 @@ else if [ -f $HOME/.aws/credentials ] then logwarn "💭 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set based on $HOME/.aws/credentials" - export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) - export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) + export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) + export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) fi fi if [ -z "$AWS_REGION" ] diff --git a/ccloud/connect-aws-redshift-sink/redshift.sh b/ccloud/connect-aws-redshift-sink/redshift.sh index 30617948e..09149493f 100755 --- a/ccloud/connect-aws-redshift-sink/redshift.sh +++ b/ccloud/connect-aws-redshift-sink/redshift.sh @@ -18,8 +18,8 @@ else if [ -f $HOME/.aws/credentials ] then logwarn "💭 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set based on $HOME/.aws/credentials" - export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) - export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) + export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) + export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) fi fi if [ -z "$AWS_REGION" ] diff --git a/ccloud/connect-centralized-license/redshift.sh b/ccloud/connect-centralized-license/redshift.sh index 9357d284c..5499a26a1 100755 --- a/ccloud/connect-centralized-license/redshift.sh +++ b/ccloud/connect-centralized-license/redshift.sh @@ -27,8 +27,8 @@ else if [ -f $HOME/.aws/credentials ] then logwarn "💭 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set based on $HOME/.aws/credentials" - export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) - export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) + export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) + export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) fi fi if [ -z "$AWS_REGION" ] diff --git a/ccloud/custom-connector-connect-aws-s3-sink/custom-s3-sink.sh b/ccloud/custom-connector-connect-aws-s3-sink/custom-s3-sink.sh index 6524383fd..4c3a29cb7 100755 --- a/ccloud/custom-connector-connect-aws-s3-sink/custom-s3-sink.sh +++ b/ccloud/custom-connector-connect-aws-s3-sink/custom-s3-sink.sh @@ -18,8 +18,8 @@ else if [ -f $HOME/.aws/credentials ] then logwarn "💭 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set based on $HOME/.aws/credentials" - export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) - export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) + export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) + export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) fi fi if [ -z "$AWS_REGION" ] diff --git a/ccloud/fully-managed-connect-aws-cloudwatch-logs-source/fully-managed-cloudwatch.sh b/ccloud/fully-managed-connect-aws-cloudwatch-logs-source/fully-managed-cloudwatch.sh index 1b0bf5e67..de42426d6 100755 --- a/ccloud/fully-managed-connect-aws-cloudwatch-logs-source/fully-managed-cloudwatch.sh +++ b/ccloud/fully-managed-connect-aws-cloudwatch-logs-source/fully-managed-cloudwatch.sh @@ -18,8 +18,8 @@ else if [ -f $HOME/.aws/credentials ] then logwarn "💭 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set based on $HOME/.aws/credentials" - export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) - export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) + export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) + export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) fi fi if [ -z "$AWS_REGION" ] diff --git a/ccloud/fully-managed-connect-aws-s3-sink/fully-managed-s3-sink.sh b/ccloud/fully-managed-connect-aws-s3-sink/fully-managed-s3-sink.sh index d4027e28d..ad187de16 100755 --- a/ccloud/fully-managed-connect-aws-s3-sink/fully-managed-s3-sink.sh +++ b/ccloud/fully-managed-connect-aws-s3-sink/fully-managed-s3-sink.sh @@ -18,8 +18,8 @@ else if [ -f $HOME/.aws/credentials ] then logwarn "💭 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set based on $HOME/.aws/credentials" - export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) - export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) + export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) + export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) fi fi if [ -z "$AWS_REGION" ] diff --git a/ccloud/fully-managed-connect-aws-s3-source/fully-managed-s3-source.sh b/ccloud/fully-managed-connect-aws-s3-source/fully-managed-s3-source.sh index 4f118a687..6d148f27c 100755 --- a/ccloud/fully-managed-connect-aws-s3-source/fully-managed-s3-source.sh +++ b/ccloud/fully-managed-connect-aws-s3-source/fully-managed-s3-source.sh @@ -20,8 +20,8 @@ else if [ -f $HOME/.aws/credentials ] then logwarn "💭 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set based on $HOME/.aws/credentials" - export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) - export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) + export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) + export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) fi fi if [ -z "$AWS_REGION" ] diff --git a/connect/connect-aws-cloudwatch-logs-source/cloudwatch.sh b/connect/connect-aws-cloudwatch-logs-source/cloudwatch.sh index 4058a93a3..c8eb9d7a7 100755 --- a/connect/connect-aws-cloudwatch-logs-source/cloudwatch.sh +++ b/connect/connect-aws-cloudwatch-logs-source/cloudwatch.sh @@ -18,8 +18,8 @@ else if [ -f $HOME/.aws/credentials ] then logwarn "💭 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set based on $HOME/.aws/credentials" - export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) - export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) + export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) + export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) fi fi if [ -z "$AWS_REGION" ] diff --git a/connect/connect-aws-cloudwatch-metrics-sink/cloudwatch-metrics-sink-with-assuming-iam-role.sh b/connect/connect-aws-cloudwatch-metrics-sink/cloudwatch-metrics-sink-with-assuming-iam-role.sh index f315564a1..6a76275a2 100644 --- a/connect/connect-aws-cloudwatch-metrics-sink/cloudwatch-metrics-sink-with-assuming-iam-role.sh +++ b/connect/connect-aws-cloudwatch-metrics-sink/cloudwatch-metrics-sink-with-assuming-iam-role.sh @@ -19,8 +19,8 @@ else if [ -f $HOME/.aws/credentials ] then logwarn "💭 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set based on $HOME/.aws/credentials" - export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) - export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) + export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) + export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) fi fi if [ -z "$AWS_REGION" ] diff --git a/connect/connect-aws-cloudwatch-metrics-sink/cloudwatch-metrics-sink.sh b/connect/connect-aws-cloudwatch-metrics-sink/cloudwatch-metrics-sink.sh index 0470d5a31..53d217321 100755 --- a/connect/connect-aws-cloudwatch-metrics-sink/cloudwatch-metrics-sink.sh +++ b/connect/connect-aws-cloudwatch-metrics-sink/cloudwatch-metrics-sink.sh @@ -18,8 +18,8 @@ else if [ -f $HOME/.aws/credentials ] then logwarn "💭 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set based on $HOME/.aws/credentials" - export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) - export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) + export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) + export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) fi fi if [ -z "$AWS_REGION" ] diff --git a/connect/connect-aws-dynamodb-sink/dynamodb-sink-proxy.sh b/connect/connect-aws-dynamodb-sink/dynamodb-sink-proxy.sh index f2dd10785..22e25cf86 100755 --- a/connect/connect-aws-dynamodb-sink/dynamodb-sink-proxy.sh +++ b/connect/connect-aws-dynamodb-sink/dynamodb-sink-proxy.sh @@ -24,8 +24,8 @@ else if [ -f $HOME/.aws/credentials ] then logwarn "💭 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set based on $HOME/.aws/credentials" - export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) - export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) + export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) + export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) fi fi if [ -z "$AWS_REGION" ] diff --git a/connect/connect-aws-dynamodb-sink/dynamodb-sink-with-assuming-iam-role-config.sh b/connect/connect-aws-dynamodb-sink/dynamodb-sink-with-assuming-iam-role-config.sh index 8cfdc9cc6..3f4977812 100755 --- a/connect/connect-aws-dynamodb-sink/dynamodb-sink-with-assuming-iam-role-config.sh +++ b/connect/connect-aws-dynamodb-sink/dynamodb-sink-with-assuming-iam-role-config.sh @@ -27,8 +27,8 @@ else if [ -f $HOME/.aws/credentials ] then logwarn "💭 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set based on $HOME/.aws/credentials" - export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) - export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) + export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) + export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) fi fi if [ -z "$AWS_REGION" ] diff --git a/connect/connect-aws-dynamodb-sink/dynamodb-sink-with-custom-basic-aws-credentials-provider.sh b/connect/connect-aws-dynamodb-sink/dynamodb-sink-with-custom-basic-aws-credentials-provider.sh index 1a60eeb08..60323bca3 100755 --- a/connect/connect-aws-dynamodb-sink/dynamodb-sink-with-custom-basic-aws-credentials-provider.sh +++ b/connect/connect-aws-dynamodb-sink/dynamodb-sink-with-custom-basic-aws-credentials-provider.sh @@ -40,8 +40,8 @@ else if [ -f $HOME/.aws/credentials ] then logwarn "💭 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set based on $HOME/.aws/credentials" - export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) - export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) + export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) + export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) fi fi if [ -z "$AWS_REGION" ] diff --git a/connect/connect-aws-dynamodb-sink/dynamodb-sink.sh b/connect/connect-aws-dynamodb-sink/dynamodb-sink.sh index bb658c4f5..7542fdff1 100755 --- a/connect/connect-aws-dynamodb-sink/dynamodb-sink.sh +++ b/connect/connect-aws-dynamodb-sink/dynamodb-sink.sh @@ -24,8 +24,8 @@ else if [ -f $HOME/.aws/credentials ] then logwarn "💭 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set based on $HOME/.aws/credentials" - export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) - export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) + export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) + export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) fi fi if [ -z "$AWS_REGION" ] diff --git a/connect/connect-aws-kinesis-source/kinesis-source-assuming-iam-role-with-custom-awscredentialsprovider.sh b/connect/connect-aws-kinesis-source/kinesis-source-assuming-iam-role-with-custom-awscredentialsprovider.sh index 72ce7be98..c638e83c1 100755 --- a/connect/connect-aws-kinesis-source/kinesis-source-assuming-iam-role-with-custom-awscredentialsprovider.sh +++ b/connect/connect-aws-kinesis-source/kinesis-source-assuming-iam-role-with-custom-awscredentialsprovider.sh @@ -60,8 +60,8 @@ else if [ -f $HOME/.aws/credentials ] then logwarn "💭 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set based on $HOME/.aws/credentials" - export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) - export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) + export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) + export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) fi fi if [ -z "$AWS_REGION" ] diff --git a/connect/connect-aws-kinesis-source/kinesis-source-proxy.sh b/connect/connect-aws-kinesis-source/kinesis-source-proxy.sh index 3369d090a..4ab050eda 100755 --- a/connect/connect-aws-kinesis-source/kinesis-source-proxy.sh +++ b/connect/connect-aws-kinesis-source/kinesis-source-proxy.sh @@ -24,8 +24,8 @@ else if [ -f $HOME/.aws/credentials ] then logwarn "💭 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set based on $HOME/.aws/credentials" - export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) - export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) + export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) + export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) fi fi if [ -z "$AWS_REGION" ] diff --git a/connect/connect-aws-kinesis-source/kinesis-source.sh b/connect/connect-aws-kinesis-source/kinesis-source.sh index 645a2112e..e2f921f33 100755 --- a/connect/connect-aws-kinesis-source/kinesis-source.sh +++ b/connect/connect-aws-kinesis-source/kinesis-source.sh @@ -24,8 +24,8 @@ else if [ -f $HOME/.aws/credentials ] then logwarn "💭 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set based on $HOME/.aws/credentials" - export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) - export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) + export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) + export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) fi fi if [ -z "$AWS_REGION" ] diff --git a/connect/connect-aws-lambda-sink/lambda-sink-assuming-iam-role-with-custom-aws-credential-provider.sh b/connect/connect-aws-lambda-sink/lambda-sink-assuming-iam-role-with-custom-aws-credential-provider.sh index 5cb293d5c..7ed959508 100755 --- a/connect/connect-aws-lambda-sink/lambda-sink-assuming-iam-role-with-custom-aws-credential-provider.sh +++ b/connect/connect-aws-lambda-sink/lambda-sink-assuming-iam-role-with-custom-aws-credential-provider.sh @@ -38,8 +38,8 @@ else if [ -f $HOME/.aws/credentials ] then logwarn "💭 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set based on $HOME/.aws/credentials" - export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) - export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) + export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) + export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) fi fi if [ -z "$AWS_REGION" ] diff --git a/connect/connect-aws-lambda-sink/lambda-sink.sh b/connect/connect-aws-lambda-sink/lambda-sink.sh index 3aa61339d..8cdee971e 100755 --- a/connect/connect-aws-lambda-sink/lambda-sink.sh +++ b/connect/connect-aws-lambda-sink/lambda-sink.sh @@ -18,8 +18,8 @@ else if [ -f $HOME/.aws/credentials ] then logwarn "💭 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set based on $HOME/.aws/credentials" - export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) - export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) + export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) + export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) fi fi if [ -z "$AWS_REGION" ] diff --git a/connect/connect-aws-redshift-sink/redshift-sink.sh b/connect/connect-aws-redshift-sink/redshift-sink.sh index 46d349b7d..5e3cb73a0 100755 --- a/connect/connect-aws-redshift-sink/redshift-sink.sh +++ b/connect/connect-aws-redshift-sink/redshift-sink.sh @@ -18,8 +18,8 @@ else if [ -f $HOME/.aws/credentials ] then logwarn "💭 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set based on $HOME/.aws/credentials" - export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) - export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) + export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) + export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) fi fi if [ -z "$AWS_REGION" ] diff --git a/connect/connect-aws-s3-sink/s3-sink-backup-and-restore-assuming-iam-role-with-custom-aws-credential-provider.sh b/connect/connect-aws-s3-sink/s3-sink-backup-and-restore-assuming-iam-role-with-custom-aws-credential-provider.sh index dea7fbe16..84ba9a945 100755 --- a/connect/connect-aws-s3-sink/s3-sink-backup-and-restore-assuming-iam-role-with-custom-aws-credential-provider.sh +++ b/connect/connect-aws-s3-sink/s3-sink-backup-and-restore-assuming-iam-role-with-custom-aws-credential-provider.sh @@ -61,8 +61,8 @@ else if [ -f $HOME/.aws/credentials ] then logwarn "💭 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set based on $HOME/.aws/credentials" - export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) - export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) + export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) + export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) fi fi if [ -z "$AWS_REGION" ] diff --git a/connect/connect-aws-s3-sink/s3-sink-proxy-basic-auth.sh b/connect/connect-aws-s3-sink/s3-sink-proxy-basic-auth.sh index db7c47641..ae13b400a 100755 --- a/connect/connect-aws-s3-sink/s3-sink-proxy-basic-auth.sh +++ b/connect/connect-aws-s3-sink/s3-sink-proxy-basic-auth.sh @@ -18,8 +18,8 @@ else if [ -f $HOME/.aws/credentials ] then logwarn "💭 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set based on $HOME/.aws/credentials" - export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) - export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) + export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) + export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) fi fi if [ -z "$AWS_REGION" ] diff --git a/connect/connect-aws-s3-sink/s3-sink-proxy-with-assuming-iam-role.sh b/connect/connect-aws-s3-sink/s3-sink-proxy-with-assuming-iam-role.sh index 661169275..603194c99 100755 --- a/connect/connect-aws-s3-sink/s3-sink-proxy-with-assuming-iam-role.sh +++ b/connect/connect-aws-s3-sink/s3-sink-proxy-with-assuming-iam-role.sh @@ -23,8 +23,8 @@ else if [ -f $HOME/.aws/credentials ] then logwarn "💭 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set based on $HOME/.aws/credentials" - export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) - export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) + export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) + export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) fi fi if [ -z "$AWS_REGION" ] diff --git a/connect/connect-aws-s3-sink/s3-sink-proxy.sh b/connect/connect-aws-s3-sink/s3-sink-proxy.sh index 6d904780e..9f17f1ef5 100755 --- a/connect/connect-aws-s3-sink/s3-sink-proxy.sh +++ b/connect/connect-aws-s3-sink/s3-sink-proxy.sh @@ -18,8 +18,8 @@ else if [ -f $HOME/.aws/credentials ] then logwarn "💭 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set based on $HOME/.aws/credentials" - export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) - export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) + export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) + export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) fi fi if [ -z "$AWS_REGION" ] diff --git a/connect/connect-aws-s3-sink/s3-sink-with-assuming-iam-role-config.sh b/connect/connect-aws-s3-sink/s3-sink-with-assuming-iam-role-config.sh index 71f887f11..9d9ef7a07 100755 --- a/connect/connect-aws-s3-sink/s3-sink-with-assuming-iam-role-config.sh +++ b/connect/connect-aws-s3-sink/s3-sink-with-assuming-iam-role-config.sh @@ -21,8 +21,8 @@ else if [ -f $HOME/.aws/credentials ] then logwarn "💭 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set based on $HOME/.aws/credentials" - export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) - export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) + export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) + export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) fi fi if [ -z "$AWS_REGION" ] diff --git a/connect/connect-aws-s3-sink/s3-sink-with-assuming-iam-role.sh b/connect/connect-aws-s3-sink/s3-sink-with-assuming-iam-role.sh index f71709fa1..641223179 100755 --- a/connect/connect-aws-s3-sink/s3-sink-with-assuming-iam-role.sh +++ b/connect/connect-aws-s3-sink/s3-sink-with-assuming-iam-role.sh @@ -19,8 +19,8 @@ else if [ -f $HOME/.aws/credentials ] then logwarn "💭 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set based on $HOME/.aws/credentials" - export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) - export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) + export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) + export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) fi fi if [ -z "$AWS_REGION" ] diff --git a/connect/connect-aws-s3-sink/s3-sink.sh b/connect/connect-aws-s3-sink/s3-sink.sh index fae628053..b5154562f 100755 --- a/connect/connect-aws-s3-sink/s3-sink.sh +++ b/connect/connect-aws-s3-sink/s3-sink.sh @@ -18,8 +18,8 @@ else if [ -f $HOME/.aws/credentials ] then logwarn "💭 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set based on $HOME/.aws/credentials" - export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) - export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) + export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) + export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) fi fi if [ -z "$AWS_REGION" ] diff --git a/connect/connect-aws-s3-source/s3-source-backup-and-restore-assuming-iam-role-with-custom-aws-credential-provider.sh b/connect/connect-aws-s3-source/s3-source-backup-and-restore-assuming-iam-role-with-custom-aws-credential-provider.sh index 422d18463..69fcae923 100755 --- a/connect/connect-aws-s3-source/s3-source-backup-and-restore-assuming-iam-role-with-custom-aws-credential-provider.sh +++ b/connect/connect-aws-s3-source/s3-source-backup-and-restore-assuming-iam-role-with-custom-aws-credential-provider.sh @@ -61,8 +61,8 @@ else if [ -f $HOME/.aws/credentials ] then logwarn "💭 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set based on $HOME/.aws/credentials" - export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) - export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) + export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) + export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) fi fi if [ -z "$AWS_REGION" ] diff --git a/connect/connect-aws-s3-source/s3-source-backup-and-restore-proxy.sh b/connect/connect-aws-s3-source/s3-source-backup-and-restore-proxy.sh index 0b740399e..0bed80f5e 100755 --- a/connect/connect-aws-s3-source/s3-source-backup-and-restore-proxy.sh +++ b/connect/connect-aws-s3-source/s3-source-backup-and-restore-proxy.sh @@ -24,8 +24,8 @@ else if [ -f $HOME/.aws/credentials ] then logwarn "💭 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set based on $HOME/.aws/credentials" - export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) - export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) + export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) + export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) fi fi if [ -z "$AWS_REGION" ] diff --git a/connect/connect-aws-s3-source/s3-source-backup-and-restore-with-assuming-iam-role-config.sh b/connect/connect-aws-s3-source/s3-source-backup-and-restore-with-assuming-iam-role-config.sh index bf6a8218a..88b350edf 100755 --- a/connect/connect-aws-s3-source/s3-source-backup-and-restore-with-assuming-iam-role-config.sh +++ b/connect/connect-aws-s3-source/s3-source-backup-and-restore-with-assuming-iam-role-config.sh @@ -26,8 +26,8 @@ else if [ -f $HOME/.aws/credentials ] then logwarn "💭 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set based on $HOME/.aws/credentials" - export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) - export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) + export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) + export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) fi fi if [ -z "$AWS_REGION" ] diff --git a/connect/connect-aws-s3-source/s3-source-backup-and-restore.sh b/connect/connect-aws-s3-source/s3-source-backup-and-restore.sh index 0f7043891..6d6a45b86 100755 --- a/connect/connect-aws-s3-source/s3-source-backup-and-restore.sh +++ b/connect/connect-aws-s3-source/s3-source-backup-and-restore.sh @@ -24,8 +24,8 @@ else if [ -f $HOME/.aws/credentials ] then logwarn "💭 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set based on $HOME/.aws/credentials" - export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) - export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) + export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) + export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) fi fi if [ -z "$AWS_REGION" ] diff --git a/connect/connect-aws-s3-source/s3-source-generalized.sh b/connect/connect-aws-s3-source/s3-source-generalized.sh index b86d97bc3..e099abe1a 100755 --- a/connect/connect-aws-s3-source/s3-source-generalized.sh +++ b/connect/connect-aws-s3-source/s3-source-generalized.sh @@ -30,8 +30,8 @@ else if [ -f $HOME/.aws/credentials ] then logwarn "💭 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set based on $HOME/.aws/credentials" - export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) - export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) + export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) + export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) fi fi if [ -z "$AWS_REGION" ] diff --git a/connect/connect-aws-sqs-source/sqs-source-2way-ssl.sh b/connect/connect-aws-sqs-source/sqs-source-2way-ssl.sh index 07d1fb93e..defabf044 100755 --- a/connect/connect-aws-sqs-source/sqs-source-2way-ssl.sh +++ b/connect/connect-aws-sqs-source/sqs-source-2way-ssl.sh @@ -18,8 +18,8 @@ else if [ -f $HOME/.aws/credentials ] then logwarn "💭 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set based on $HOME/.aws/credentials" - export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) - export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) + export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) + export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) fi fi if [ -z "$AWS_REGION" ] diff --git a/connect/connect-aws-sqs-source/sqs-source-proxy.sh b/connect/connect-aws-sqs-source/sqs-source-proxy.sh index fda2bb92f..94fdedb79 100755 --- a/connect/connect-aws-sqs-source/sqs-source-proxy.sh +++ b/connect/connect-aws-sqs-source/sqs-source-proxy.sh @@ -18,8 +18,8 @@ else if [ -f $HOME/.aws/credentials ] then logwarn "💭 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set based on $HOME/.aws/credentials" - export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) - export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) + export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) + export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) fi fi if [ -z "$AWS_REGION" ] diff --git a/connect/connect-aws-sqs-source/sqs-source-sasl-ssl.sh b/connect/connect-aws-sqs-source/sqs-source-sasl-ssl.sh index 46e2ef63b..4d84c0e71 100755 --- a/connect/connect-aws-sqs-source/sqs-source-sasl-ssl.sh +++ b/connect/connect-aws-sqs-source/sqs-source-sasl-ssl.sh @@ -18,8 +18,8 @@ else if [ -f $HOME/.aws/credentials ] then logwarn "💭 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set based on $HOME/.aws/credentials" - export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) - export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) + export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) + export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) fi fi if [ -z "$AWS_REGION" ] diff --git a/connect/connect-aws-sqs-source/sqs-source.sh b/connect/connect-aws-sqs-source/sqs-source.sh index c0e274f15..472b0c3ef 100755 --- a/connect/connect-aws-sqs-source/sqs-source.sh +++ b/connect/connect-aws-sqs-source/sqs-source.sh @@ -18,8 +18,8 @@ else if [ -f $HOME/.aws/credentials ] then logwarn "💭 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set based on $HOME/.aws/credentials" - export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) - export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) + export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) + export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) fi fi if [ -z "$AWS_REGION" ] diff --git a/connect/connect-filepulse-source/s3-csv.sh b/connect/connect-filepulse-source/s3-csv.sh index b3269832d..e3463e59d 100755 --- a/connect/connect-filepulse-source/s3-csv.sh +++ b/connect/connect-filepulse-source/s3-csv.sh @@ -41,8 +41,8 @@ else if [ -f $HOME/.aws/credentials ] then logwarn "💭 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set based on $HOME/.aws/credentials" - export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) - export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) + export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) + export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) fi fi if [ -z "$AWS_REGION" ] diff --git a/connect/connect-filepulse-source/s3-json.sh b/connect/connect-filepulse-source/s3-json.sh index 2857fd28d..d2056068b 100755 --- a/connect/connect-filepulse-source/s3-json.sh +++ b/connect/connect-filepulse-source/s3-json.sh @@ -41,8 +41,8 @@ else if [ -f $HOME/.aws/credentials ] then logwarn "💭 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set based on $HOME/.aws/credentials" - export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) - export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) + export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) + export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) fi fi if [ -z "$AWS_REGION" ] diff --git a/connect/connect-jdbc-aws-athena-source/athena-jdbc-source.sh b/connect/connect-jdbc-aws-athena-source/athena-jdbc-source.sh index a6986b7df..2de1bc77e 100755 --- a/connect/connect-jdbc-aws-athena-source/athena-jdbc-source.sh +++ b/connect/connect-jdbc-aws-athena-source/athena-jdbc-source.sh @@ -25,8 +25,8 @@ else if [ -f $HOME/.aws/credentials ] then logwarn "💭 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set based on $HOME/.aws/credentials" - export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) - export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) + export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) + export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) fi fi if [ -z "$AWS_REGION" ] diff --git a/connect/connect-jdbc-aws-redshift-sink/redshift-jdbc-sink.sh b/connect/connect-jdbc-aws-redshift-sink/redshift-jdbc-sink.sh index 870122cd8..3fceaa75d 100755 --- a/connect/connect-jdbc-aws-redshift-sink/redshift-jdbc-sink.sh +++ b/connect/connect-jdbc-aws-redshift-sink/redshift-jdbc-sink.sh @@ -27,8 +27,8 @@ else if [ -f $HOME/.aws/credentials ] then logwarn "💭 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set based on $HOME/.aws/credentials" - export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) - export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) + export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) + export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) fi fi if [ -z "$AWS_REGION" ] diff --git a/connect/connect-jdbc-aws-redshift-source/redshift-jdbc-source.sh b/connect/connect-jdbc-aws-redshift-source/redshift-jdbc-source.sh index 47dd98602..768b126e2 100755 --- a/connect/connect-jdbc-aws-redshift-source/redshift-jdbc-source.sh +++ b/connect/connect-jdbc-aws-redshift-source/redshift-jdbc-source.sh @@ -27,8 +27,8 @@ else if [ -f $HOME/.aws/credentials ] then logwarn "💭 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set based on $HOME/.aws/credentials" - export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) - export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) + export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) + export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) fi fi if [ -z "$AWS_REGION" ] diff --git a/other/tiered-storage-with-aws/start.sh b/other/tiered-storage-with-aws/start.sh index 0bada96b6..f08eae7c4 100755 --- a/other/tiered-storage-with-aws/start.sh +++ b/other/tiered-storage-with-aws/start.sh @@ -23,8 +23,8 @@ else if [ -f $HOME/.aws/credentials ] then logwarn "💭 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set based on $HOME/.aws/credentials" - export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) - export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) + export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) + export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) fi fi if [ -z "$AWS_REGION" ] diff --git a/scripts/cleanup-resources.sh b/scripts/cleanup-resources.sh index e6cc1069b..8cbe241bd 100755 --- a/scripts/cleanup-resources.sh +++ b/scripts/cleanup-resources.sh @@ -116,8 +116,8 @@ else if [ -f $HOME/.aws/credentials ] then logwarn "💭 AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are set based on $HOME/.aws/credentials" - export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) - export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials| awk -F'=' '{print $2;}' ) + export AWS_ACCESS_KEY_ID=$( grep "^aws_access_key_id" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) + export AWS_SECRET_ACCESS_KEY=$( grep "^aws_secret_access_key" $HOME/.aws/credentials | head -1 | awk -F'=' '{print $2;}' ) fi fi if [ -z "$AWS_REGION" ]