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

AWS Step Functions Tasks - HttpInvoke: Bug in code example #30940

Closed
DennisTraub opened this issue Jul 24, 2024 · 3 comments · Fixed by #31364
Closed

AWS Step Functions Tasks - HttpInvoke: Bug in code example #30940

DennisTraub opened this issue Jul 24, 2024 · 3 comments · Fixed by #31364
Labels
@aws-cdk/aws-lambda Related to AWS Lambda bug This issue is a bug. documentation This is a problem with documentation. effort/small Small work item – less than a day of effort p3

Comments

@DennisTraub
Copy link

Describe the issue

The value passed into the api_endpoint parameter in the code example does not work and leads to an error. It doesn't accept the full url, it must be the path, relative to the value in apiRoot.

// Is:

tasks.HttpInvoke(self, "Invoke HTTP API",
    api_root="https://api.example.com",
    api_endpoint=sfn.TaskInput.from_text("https://api.example.com/path/to/resource"),
    ...
)

// Should be:

tasks.HttpInvoke(self, "Invoke HTTP API",
    api_root="https://api.example.com",
    api_endpoint=sfn.TaskInput.from_text("path/to/resource"),
    ...
)

Links

API Reference / aws_cdk.aws_stepfunctions_tasks / HttpInvoke

@DennisTraub DennisTraub added documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged. labels Jul 24, 2024
@github-actions github-actions bot added the @aws-cdk/aws-lambda Related to AWS Lambda label Jul 24, 2024
@ashishdhingra ashishdhingra self-assigned this Jul 24, 2024
@ashishdhingra ashishdhingra added investigating This issue is being investigated and/or work is in progress to resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. labels Jul 24, 2024
@ashishdhingra
Copy link
Contributor

Example appears to be incorrect. The documentation states that api_endpoint (TaskInput) is The API endpoint to call, relative to apiRoot.

@ashishdhingra ashishdhingra added p3 effort/small Small work item – less than a day of effort and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Jul 24, 2024
@ashishdhingra ashishdhingra removed their assignment Jul 24, 2024
@moelasmar moelasmar added the bug This issue is a bug. label Aug 28, 2024
@mergify mergify bot closed this as completed in #31364 Sep 8, 2024
@mergify mergify bot closed this as completed in ab73e53 Sep 8, 2024
Copy link

github-actions bot commented Sep 8, 2024

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

1 similar comment
Copy link

github-actions bot commented Sep 8, 2024

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 8, 2024
pahud pushed a commit to pahud/aws-cdk that referenced this issue Sep 9, 2024
xazhao pushed a commit to xazhao/aws-cdk that referenced this issue Sep 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
@aws-cdk/aws-lambda Related to AWS Lambda bug This issue is a bug. documentation This is a problem with documentation. effort/small Small work item – less than a day of effort p3
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants