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

Generate policy statements for "Call third-party API" states #599

Open
yuyokk opened this issue Dec 3, 2023 · 0 comments
Open

Generate policy statements for "Call third-party API" states #599

yuyokk opened this issue Dec 3, 2023 · 0 comments

Comments

@yuyokk
Copy link

yuyokk commented Dec 3, 2023

This is a Feature Request

Description

AWS announced ability to call external endpoints at AWS re:invent.

If I define following state:

Call api:
  Type: Task
  Resource: arn:aws:states:::http:invoke
  Parameters:
    ApiEndpoint.$: '$.apiUrl'
    Method.$: '$.method'
    Authentication:
      ConnectionArn.$: '$.connectionArn'

During deploy I see the following warning

Cannot generate IAM policy statement for Task state { Type: 'Task',
  Resource: 'arn:aws:states:::http:invoke',
  Parameters:
   { 'ApiEndpoint.$': '$.apiUrl',
     'Method.$': '$.method',
     Authentication: { 'ConnectionArn.$': '$.connectionArn' } },
  Next: 'Success' }
✓ State machine "TestStepFunction" definition is valid

And during run my Step Function fails with

AWS Step Functions is not authorized to perform states:InvokeHTTPEndpoint on API Endpoint https://example.com. Ensure that the StateMachine role contains the states:InvokeHTTPEndpoint permission for the given API Endpoint

Additional Data

  • Serverless Framework Core Version you're using: 3.38.0
  • The Plugin Version you're using: 3.17.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants