Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(stepfunctions): distributed map state #24331

Closed
wants to merge 38 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
e871544
update map state with latest fields
beck3905 Feb 21, 2023
3859b31
update map state with latest fields
beck3905 Feb 21, 2023
0f62ba3
add distributed map state
beck3905 Feb 24, 2023
a186a7a
add distributed map integration tests and update existing integration…
beck3905 Feb 24, 2023
ffe9bde
update docs
beck3905 Feb 24, 2023
572960e
update stepfunctions-api integration test
beck3905 Feb 24, 2023
57a8efe
try to fix integration tests
beck3905 Feb 25, 2023
08f42ab
fix test and update readme
beck3905 Feb 27, 2023
e041ff2
update test snapshot
beck3905 Feb 27, 2023
d8f3fc9
update readme docs
beck3905 Feb 27, 2023
788c7fc
remove obsolete comments
beck3905 Feb 27, 2023
c832557
render parameters still
beck3905 Feb 27, 2023
48fdc0e
fix readme
beck3905 Feb 27, 2023
cd6324d
uncomment test
beck3905 Feb 27, 2023
4e27158
fix syntax
beck3905 Feb 27, 2023
213bcc9
remove whitespace
beck3905 Feb 27, 2023
308016d
mostly whitespace and docstring cleanup
beck3905 Feb 27, 2023
fdcb45c
add test for deprecated parameters field
beck3905 Feb 28, 2023
6ccc0a4
add isDistributedMap function instead of instanceof
beck3905 Mar 1, 2023
7ca2f0e
fix unintended change
beck3905 Mar 1, 2023
ce19ee5
add bind method instead of requiresExecutionPermissions property
beck3905 Mar 1, 2023
6af0f39
added unit tests
beck3905 Mar 1, 2023
fcefe0c
add maxItems and other minor updates
beck3905 Mar 8, 2023
c479e42
fix iterator resultPath
beck3905 Mar 9, 2023
986ccb9
update policy add by bind method
beck3905 Mar 10, 2023
eb6e126
revert accidentally committed file
beck3905 Mar 10, 2023
edf4dc4
use explicit path properties to be consistent with how Condition hand…
beck3905 Mar 21, 2023
8d21539
fix references
beck3905 Apr 3, 2023
7b1cf47
cleanup
beck3905 Apr 3, 2023
f597e48
fix references
beck3905 Apr 4, 2023
7d36532
re-add distributed-map tests lost during merge
beck3905 Apr 4, 2023
db2ba84
update snapshot
beck3905 May 4, 2023
9d2a4de
use partition
beck3905 May 17, 2023
936497f
fix import order
beck3905 May 17, 2023
3bfd38e
fix unit test
beck3905 May 17, 2023
70f89c1
fix integration test
beck3905 May 17, 2023
3deff5e
fix whitespace
beck3905 Jun 5, 2023
e8b7352
fix whitespace
beck3905 Jun 6, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add distributed map integration tests and update existing integration…
… tests
  • Loading branch information
beck3905 committed Jun 5, 2023
commit a186a7aed230ecc54a3e493a726fd9fe8e72066c
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"version": "30.0.0",
"files": {
"88187762ebb3676ec68ded03ce92c045563205c6497ae5a104f13a32dbf4ef43": {
"97d16bb7ba2ae6d9cb22f0b1fa8baa7c02af5176b7d5c016a6824361a838e616": {
"source": {
"path": "aws-stepfunctions-custom-state-integ.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "88187762ebb3676ec68ded03ce92c045563205c6497ae5a104f13a32dbf4ef43.json",
"objectKey": "97d16bb7ba2ae6d9cb22f0b1fa8baa7c02af5176b7d5c016a6824361a838e616.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@
},
"DefinitionString": "{\"StartAt\":\"my custom task\",\"States\":{\"my custom task\":{\"Next\":\"final step\",\"Type\":\"Task\",\"Resource\":\"arn:aws:states:::dynamodb:putItem\",\"Parameters\":{\"TableName\":\"my-cool-table\",\"Item\":{\"id\":{\"S\":\"my-entry\"}}},\"ResultPath\":null},\"final step\":{\"Type\":\"Pass\",\"End\":true}},\"TimeoutSeconds\":30}"
},
"DependsOn": [
"StateMachineRoleB840431D"
],
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"validateOnSynth": false,
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/88187762ebb3676ec68ded03ce92c045563205c6497ae5a104f13a32dbf4ef43.json",
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/97d16bb7ba2ae6d9cb22f0b1fa8baa7c02af5176b7d5c016a6824361a838e616.json",
"requiresBootstrapStackVersion": 6,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
"additionalDependencies": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
"path": "Tree",
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.237"
"version": "10.1.252"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"version": "30.0.0",
"files": {
"1f3c2cfb18e102edc713fe4c4b4d87572f4297ee4a5e80a5960adf526ee9ea28": {
"source": {
"path": "asset.1f3c2cfb18e102edc713fe4c4b4d87572f4297ee4a5e80a5960adf526ee9ea28.bundle",
"packaging": "zip"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "1f3c2cfb18e102edc713fe4c4b4d87572f4297ee4a5e80a5960adf526ee9ea28.zip",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
},
"9380edb21326225b7731531954a3300d128d8056a2e08756f7c804c9ac954383": {
"source": {
"path": "DistributedMapDefaultTestDeployAssertFD6CBCC4.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "9380edb21326225b7731531954a3300d128d8056a2e08756f7c804c9ac954383.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
}
},
"dockerImages": {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,245 @@
{
"Resources": {
"AwsApiCallStepFunctionsdescribeStateMachine": {
"Type": "Custom::DeployAssert@SdkCallStepFunctionsdescribeStateMachin",
"Properties": {
"ServiceToken": {
"Fn::GetAtt": [
"SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F",
"Arn"
]
},
"service": "StepFunctions",
"api": "describeStateMachine",
"expected": "{\"$ObjectLike\":{\"status\":\"ACTIVE\"}}",
"parameters": {
"stateMachineArn": {
"Fn::ImportValue": "aws-stepfunctions-map-integ:ExportsOutputRefStateMachine2E01A3A5BA46F753"
}
},
"flattenResponse": "false",
"salt": "1677270411254"
},
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
},
"SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73": {
"Type": "AWS::IAM::Role",
"Properties": {
"AssumeRolePolicyDocument": {
"Version": "2012-10-17",
"Statement": [
{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": {
"Service": "lambda.amazonaws.com"
}
}
]
},
"ManagedPolicyArns": [
{
"Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
}
],
"Policies": [
{
"PolicyName": "Inline",
"PolicyDocument": {
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"states:DescribeStateMachine"
],
"Effect": "Allow",
"Resource": [
"*"
]
},
{
"Action": [
"s3:PutObject"
],
"Effect": "Allow",
"Resource": [
"*"
]
},
{
"Action": [
"states:StartExecution"
],
"Effect": "Allow",
"Resource": [
"*"
]
},
{
"Action": [
"states:DescribeExecution"
],
"Effect": "Allow",
"Resource": [
"*"
]
}
]
}
}
]
}
},
"SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F": {
"Type": "AWS::Lambda::Function",
"Properties": {
"Runtime": "nodejs14.x",
"Code": {
"S3Bucket": {
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
},
"S3Key": "1f3c2cfb18e102edc713fe4c4b4d87572f4297ee4a5e80a5960adf526ee9ea28.zip"
},
"Timeout": 120,
"Handler": "index.handler",
"Role": {
"Fn::GetAtt": [
"SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73",
"Arn"
]
}
}
},
"AwsApiCallS3putObject": {
"Type": "Custom::DeployAssert@SdkCallS3putObject",
"Properties": {
"ServiceToken": {
"Fn::GetAtt": [
"SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F",
"Arn"
]
},
"service": "S3",
"api": "putObject",
"parameters": {
"Bucket": {
"Fn::ImportValue": "aws-stepfunctions-map-integ:ExportsOutputRefBucket83908E7781C90AC0"
},
"Key": "my-key.csv",
"Body": "a,b,c\n1,2,3\n4,5,6"
},
"flattenResponse": "false",
"salt": "1677270411255"
},
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
},
"AwsApiCallStepFunctionsstartExecution": {
"Type": "Custom::DeployAssert@SdkCallStepFunctionsstartExecution",
"Properties": {
"ServiceToken": {
"Fn::GetAtt": [
"SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F",
"Arn"
]
},
"service": "StepFunctions",
"api": "startExecution",
"parameters": {
"stateMachineArn": {
"Fn::ImportValue": "aws-stepfunctions-map-integ:ExportsOutputRefStateMachine2E01A3A5BA46F753"
}
},
"flattenResponse": "true",
"salt": "1677270411255"
},
"DependsOn": [
"AwsApiCallS3putObject"
],
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
},
"AwsApiCallStepFunctionsdescribeExecution": {
"Type": "Custom::DeployAssert@SdkCallStepFunctionsdescribeExecution",
"Properties": {
"ServiceToken": {
"Fn::GetAtt": [
"SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F",
"Arn"
]
},
"service": "StepFunctions",
"api": "describeExecution",
"expected": "{\"$ObjectLike\":{\"status\":\"SUCCEEDED\"}}",
"parameters": {
"executionArn": {
"Fn::GetAtt": [
"AwsApiCallStepFunctionsstartExecution",
"apiCallResponse.executionArn"
]
}
},
"flattenResponse": "false",
"salt": "1677270411255"
},
"DependsOn": [
"AwsApiCallStepFunctionsstartExecution"
],
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
}
},
"Outputs": {
"AssertionResultsAwsApiCallStepFunctionsdescribeStateMachine": {
"Value": {
"Fn::GetAtt": [
"AwsApiCallStepFunctionsdescribeStateMachine",
"assertion"
]
}
},
"AssertionResultsAwsApiCallStepFunctionsdescribeExecution": {
"Value": {
"Fn::GetAtt": [
"AwsApiCallStepFunctionsdescribeExecution",
"assertion"
]
}
}
},
"Parameters": {
"BootstrapVersion": {
"Type": "AWS::SSM::Parameter::Value<String>",
"Default": "/cdk-bootstrap/hnb659fds/version",
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
}
},
"Rules": {
"CheckBootstrapVersion": {
"Assertions": [
{
"Assert": {
"Fn::Not": [
{
"Fn::Contains": [
[
"1",
"2",
"3",
"4",
"5"
],
{
"Ref": "BootstrapVersion"
}
]
}
]
},
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
}
]
}
}
}
Loading