Insufficient privilege when running AWS Backup from Step Function

0

I'm trying to start a backup job from a step function, but getting a Backup.BackupException, with this message:

Insufficient privileges to perform this action. (Service: Backup, Status Code: 403, Request ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)

My state is very simple ($.table is the ARN of a dynamoDB table):

"StartBackupJob": {
  "Type": "Task",
  "Parameters": {
    "BackupVaultName": "my-vault",
    "IamRoleArn": "arn:aws:iam::xxxxxxxxxxxx:role/aws-service-role/backup.amazonaws.com/AWSServiceRoleForBackup",
    "ResourceArn": "$.table"
  },
  "Resource": "arn:aws:states:::aws-sdk:backup:startBackupJob",
  "End": true
}

I even get this when the IAM role for the step function has full permissions. Also, if I assume this role, and use it to start a backup job from the AWS CLI with the same exact parameters, it succeeds.

Any idea what I'm doing wrong?

Shahar
질문됨 2년 전3045회 조회
1개 답변
0
수락된 답변

OK, I figured it out. This isn't really a permissions problem. I should have had ResourceArn.$, to make the step function parse the parameter.

Shahar
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠