serverless-operations / serverless-step-functions

AWS Step Functions plugin for Serverless Framework ⚡️
Other
1.02k stars 204 forks source link

Support s3 putobject task #569

Closed tvhees closed 12 months ago

tvhees commented 1 year ago

This PR involves 3 related tasks:

  1. Compile IAM roles for ResultWriter in Map states
  2. Compile IAM roles for steps using s3:PutObject as required for ResultWriter, and also for SDK integrations
  3. Fix an incorrect test expectation for s3 IAM roles
    • specifying a non-path value for path parameters like Bucket.$ is not valid ASL syntax

Example steps:

                  Store-In-S3:
                    Type: Task
                    Resource: arn:aws:states:::aws-sdk:s3:putObject
                    Parameters:
                      Bucket: bucket-name
                      Key: key.json
                      Body.$: $
                  S3-Output:
                    Type: Map
                    MaxConcurrency: 1
                    End: true
                    ItemProcessor:
                      ProcessorConfig:
                        Mode: DISTRIBUTED
                        ExecutionType: EXPRESS
                      StartAt: Inner-Step
                      States:
                        Inner-Step:
                          Type: Pass
                          End: true
                    ResultWriter:
                      Resource: arn:aws:states:::s3:putObject
                      Parameters:
                        Bucket: bucket-name
                        Prefix: s3-output-map-result
horike37 commented 12 months ago

:tada: This PR is included in version 3.14.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: