Skip to content

feat(iam): generate IAM policy for http:invoke (Call third-party API) states#688

Merged
zirkelc merged 1 commit intoserverless-operations:masterfrom
BANCS-Norway:feat-599-http-invoke-iam
Mar 18, 2026
Merged

feat(iam): generate IAM policy for http:invoke (Call third-party API) states#688
zirkelc merged 1 commit intoserverless-operations:masterfrom
BANCS-Norway:feat-599-http-invoke-iam

Conversation

@VirtueMe
Copy link
Copy Markdown
Collaborator

Summary

  • Adds IAM policy generation for arn:aws:states:::http:invoke Task states (AWS Step Functions HTTP endpoints / "Call third-party API")
  • Generates the three permissions required by AWS:
    • states:InvokeHTTPEndpoint on *
    • events:RetrieveConnectionCredentials on the static ConnectionArn if provided, or * if it is a dynamic JSONPath/JSONata reference
    • secretsmanager:GetSecretValue + secretsmanager:DescribeSecret on the EventBridge Connections secrets prefix (events!connection/*)

Fixes #599

Test plan

  • New test: static ConnectionArn — verifies each permission statement individually
  • New test: dynamic ConnectionArn.$ (JSONPath) — verifies that states:InvokeHTTPEndpoint and events:RetrieveConnectionCredentials are consolidated into a single * resource statement
  • Full test suite passes (npm test — 439 tests)

🤖 Generated with Claude Code

… states

When a state uses `arn:aws:states:::http:invoke` to call external HTTP
endpoints, generate the required IAM permissions automatically:
- `states:InvokeHTTPEndpoint` on `*`
- `events:RetrieveConnectionCredentials` on the ConnectionArn (or `*`
  if the ARN is a dynamic JSONPath/JSONata reference)
- `secretsmanager:GetSecretValue` and `secretsmanager:DescribeSecret`
  on the EventBridge Connections secrets prefix

Fixes serverless-operations#599

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 18, 2026

Open in StackBlitz

npm i https://pkg.pr.new/serverless-operations/serverless-step-functions@688

commit: c7db104

@zirkelc zirkelc merged commit 11018ae into serverless-operations:master Mar 18, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants