- Newest
- Most votes
- Most comments
The issue you're experiencing is related to the content type returned by the Docker Hub API. While your Step Function is requesting specific content types in the Accept header, the API is responding with a different content type that Step Functions doesn't currently support.
The error message indicates that the response has a content-type of 'application/vnd.oci.image.index.v1+json', which is not in the list of supported content types for AWS Step Functions' HTTP task.
To resolve this issue, you have a few options:
-
Contact AWS Support: Since this appears to be a limitation in Step Functions' HTTP task, you might want to reach out to AWS Support to inquire about adding support for this content type.
-
Use a Lambda function: As a workaround, you could create a Lambda function to make the HTTP request to the Docker Hub API. Lambda functions give you more control over handling different content types and can process the response before passing it back to your Step Function.
-
Check with Docker Hub: You might want to check if there's a way to request a different content type from the Docker Hub API that matches one of the supported types in Step Functions.
-
Modify your request: Try adjusting your Accept header to include the content type that's being returned. Although this might not solve the issue directly, it could provide more information about why the API is responding with this specific content type.
For now, the most reliable workaround would be to use a Lambda function to make the API call. This would allow you to handle the response regardless of its content type and then pass the processed data back to your Step Function.
Remember to update your IAM roles and permissions accordingly if you decide to introduce a Lambda function into your workflow.
Sources
Community | Third-party API integration in AWS Step-Functions
Community | Call external APIs with OAuth within Step Functions
External endpoints and testing of task states now available in AWS Step Functions | AWS News Blog
answered 2 years ago
Relevant content
asked 2 years ago
asked 3 years ago

How do I contact support? I can't find a way to do so without paying a ransom.