Skip to content

Conversation

@theburningmonk
Copy link
Collaborator

Closes #240

To enable this feature, I had to make two changes:

  1. to add lambda:InvokeFunction permissions to <function arn>:* always, since state machines share the same IAM role (unfortunately). This is to cater for the fact that if you deploy with useExactVersion: false then deploy again with useExactVersion: true then the shared IAM role would need to execute against both arn:aws:...:function-name as well as arn:aws:...:function-name:version.

  2. add a configuration for useExactVersion and when it's enabled, iterate through the captured function ARNs and swap them out for the corresponding Lambda version.

Besides these, I added a schema definition for the state machine object itself so it's defined in one place and we can remove quite a few if conditions from compileStateMachine.js.

@horike37
Copy link
Collaborator

@theburningmonk
The code looks good! but the doc lacks. can you also add it?

@theburningmonk
Copy link
Collaborator Author

@horike37 yup, will do

@theburningmonk
Copy link
Collaborator Author

@horike37 done

Copy link
Collaborator

@horike37 horike37 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@theburningmonk
Awesome! LGTM.

@horike37 horike37 merged commit e30421e into master Aug 19, 2019
@horike37 horike37 deleted the feature/exact_version branch August 19, 2019 13:14
@horike37
Copy link
Collaborator

🎉 This PR is included in version 2.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

ss-betseqnzr pushed a commit to BetSEQNZR/serverless-step-functions that referenced this pull request Sep 8, 2023
…act_version

Feature/support_exact_version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow reference against specific version of function

3 participants