【问题标题】:Bitbucket pipeline AWS script to send sqs message failingBitbucket 管道 AWS 脚本发送 sqs 消息失败
【发布时间】:2021-11-03 17:15:39
【问题描述】:

我有一个 bitbucket 管道,它构建然后向 SQS 发送消息。管道构建然后在我的 sendqsreq.sh 失败,错误代码为./scripts/sendsqsreq.sh: line 14: aws: command not found,请参见下面的屏幕截图:

脚本代码如下:

#!/bin/bash

# Exit upon encountering an error
set -euo pipefail

# Set the base route
ROOT_DIR=$(pwd)

# Run the script to set up the env variables and other custom functions
source $ROOT_DIR/scripts/utilis.sh

sendsqsrequest(){
  info "sending sqs request"
  is_success_or_fail $(aws sqs send-message --queue-url $QUEUEURL --message-body "bitbukcet manualrun trigger" --region=$AWS_REGION)
}
main () {
    sendsqsrequest
}

main

第 14 行是is_success_or_fail $(aws sqs send-message --queue-url $QUEUEURL --message-body "bitbukcet manualrun trigger" --region=$AWS_REGION)

我不确定我缺少什么命令。

您能提供的任何帮助将不胜感激。

【问题讨论】:

    标签: amazon-web-services amazon-sqs bitbucket-pipelines


    【解决方案1】:

    我必须在管道中更改此行:export PATH=~/bin:$PATHexport PATH=~/bin/aws:$PATH

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-12-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-01-05
      • 1970-01-01
      相关资源
      最近更新 更多