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

Allow reference against specific version of function #240

Open
theburningmonk opened this issue Aug 8, 2019 · 2 comments

Comments

@theburningmonk
Copy link
Collaborator

commented Aug 8, 2019

This is a Feature Proposal

Description

To make it easy to implement blue-green deployments for step functions (hence ensuring that running executions are not affected by deployments), we can add a configuration option to reference the current version of functions.

e.g.

stepFunctions:
  stateMachines:
    myStateMachine:
      name: blah
      useExactVersion: true # default to false for backward compatibility
      definition:
        StartAt: Hello
        States:
          Hello:
            Type: Task
            Resource:
              Fn::GetAtt: [hello, Arn] # we'll replace this
            End: true

When useExactVersion is true, we can swap out the function ARN with the ARN of the version to be deployed.

We'll also need to adjust the IAM roles that are generated to allow InvokeFunction permission on all versions (e.g. arn:aws:lambda:us-east-1:123456789012:function:hello:*) as well. Otherwise, after a deploy, the existing executions would lose the ability to invoke the previous version of the functions.

More info on how I managed to do this with alias instead of versions: https://theburningmonk.com/2019/08/how-to-do-blue-green-deployment-for-step-functions/

@theburningmonk

This comment has been minimized.

Copy link
Collaborator Author

commented Aug 9, 2019

@horike37 what do you think?

@horike37

This comment has been minimized.

Copy link
Owner

commented Aug 10, 2019

@theburningmonk
Make sense. LGTM 👍

theburningmonk added a commit that referenced this issue Aug 18, 2019

@theburningmonk theburningmonk referenced a pull request that will close this issue Aug 18, 2019

Open

Feature/support_exact_version #247

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.