serverless-step-functions
Advanced tools
Comparing version 2.29.0 to 2.30.0
@@ -289,2 +289,31 @@ 'use strict'; | ||
function getSageMakerPermissions(state) { | ||
const transformJobName = state.Parameters.TransformJobName ? `${state.Parameters.TransformJobName}` : ''; | ||
return [ | ||
{ | ||
action: 'sagemaker:CreateTransformJob,sagemaker:DescribeTransformJob,sagemaker:StopTransformJob', | ||
resource: { | ||
'Fn::Sub': [ | ||
`arn:aws:sagemaker:$\{AWS::Region}:$\{AWS::AccountId}:transform-job/${transformJobName}*`, | ||
{}, | ||
], | ||
}, | ||
}, | ||
{ | ||
action: 'sagemaker:ListTags', | ||
resource: '*', | ||
}, | ||
{ | ||
action: 'events:PutTargets,events:PutRule,events:DescribeRule', | ||
resource: { | ||
'Fn::Sub': [ | ||
'arn:aws:events:${AWS::Region}:${AWS::AccountId}:rule/StepFunctionsGetEventsForSageMakerTransformJobsRule', | ||
{}, | ||
], | ||
}, | ||
}, | ||
]; | ||
} | ||
// if there are multiple permissions with the same action, then collapsed them into one | ||
@@ -374,2 +403,5 @@ // permission instead, and collect the resources into an array | ||
case 'arn:aws:states:::sagemaker:createTransformJob.sync': | ||
return getSageMakerPermissions(state); | ||
default: | ||
@@ -376,0 +408,0 @@ if (isIntrinsic(state.Resource) || state.Resource.startsWith('arn:aws:lambda')) { |
{ | ||
"name": "serverless-step-functions", | ||
"version": "2.29.0", | ||
"version": "2.30.0", | ||
"description": "The module is AWS Step Functions plugin for Serverless Framework", | ||
@@ -42,3 +42,3 @@ "main": "lib/index.js", | ||
"nyc": "^15.0.0", | ||
"semantic-release": "^15.14.0", | ||
"semantic-release": "^17.4.2", | ||
"serverless": "^1.72.0", | ||
@@ -45,0 +45,0 @@ "sinon": "^1.17.5" |
@@ -50,2 +50,3 @@ # Serverless Step Functions | ||
- [Specifying a custom CloudWatch EventBus](#specifying-a-custom-cloudwatch-eventbus) | ||
- [Specifying a custom EventBridge EventBus](#specifying-a-custom-eventbridge-eventbus) | ||
- [Tags](#tags) | ||
@@ -1089,3 +1090,3 @@ - [Commands](#commands) | ||
You can choose which CloudWatch Event bus to listen to: | ||
You can choose which CloudWatch Event bus: | ||
@@ -1095,3 +1096,3 @@ ```yml | ||
stateMachines: | ||
cloudwatchEvent: | ||
exampleCloudwatchEventStartsMachine: | ||
events: | ||
@@ -1112,2 +1113,25 @@ - cloudwatchEvent: | ||
#### Specifying a custom EventBridge EventBus | ||
You can choose which EventBridge Event bus: | ||
```yml | ||
stepFunctions: | ||
stateMachines: | ||
exampleEventBridgeEventStartsMachine: | ||
events: | ||
- eventBridge: | ||
eventBusName: 'my-custom-event-bus' | ||
event: | ||
source: | ||
- "my.custom.source" | ||
detail-type: | ||
- "My Event Type" | ||
detail: | ||
state: | ||
- pending | ||
definition: | ||
... | ||
``` | ||
## Tags | ||
@@ -1114,0 +1138,0 @@ |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
527350
12812
1606