拒绝访问错误 AWS 转录节点 JS API

Access Denied error AWS Transcription Node JS API

我正在使用以下代码在 Node JS 上使用 AWS 转录 API

const tClient = new TranscribeClient({
        region: "us-east-1",
        credentials: {
            accessKeyId: AWS_ID,
            secretAccessKey: SECRET,
        }
    });

    const params = {
        TranscriptionJobName: "firstjob",
        LanguageCode: "en-US", // For example, 'en-US'
        MediaFormat: "m4a", // For example, 'wav'
        Media: {
          MediaFileUri: "https://transcribe-demo.s3-REGION.amazonaws.com/hello_world.m4a",
       
        },
      };

     const run = async () => {
        try {
          const data = await tClient.send(
            new StartTranscriptionJobCommand(params)
          );
          console.log("Success - put", data);
          return data; // For unit tests.
        } catch (err) {
          console.log("Error", err);
        }
    };
    run();

但我收到以下错误,我已检查所有权限和访问密钥是否正确。我无法理解错误原因。

AccessDeniedException: User: arn:aws:iam::494240200407:user/demno_system is not authorized to perform: transcribe:StartTranscriptionJob on resource: arn:aws:transcribe:us-east-1:494240200407:transcription-job/firstjob because no permissions boundary allows the transcribe:StartTranscriptionJob action

欢迎任何意见。

如错误消息中所述,您的权限范围不允许执行此操作。您向用户添加所需策略的事实没有任何效果,因为访问受权限边界限制。您需要编辑用户的权限边界以允许此操作。

参考documentation.