Open
Conversation
- R1: Add AWS_REGION to region fallback chain - R2: Replace openssl rand with /dev/urandom - R9: Remove Appendix/Generation details from READMEs - R10: Remove internal references - R13: Add REVISION-HISTORY.md
mwunderl
commented
Apr 22, 2026
| ## Step 1: Detect the dominant language | ||
|
|
||
| ```bash | ||
| aws comprehend detect-dominant-language --text "Your text here" \ |
Contributor
Author
There was a problem hiding this comment.
use a more interesting example text
|
|
||
| ## Step 1: Create a sample document image | ||
|
|
||
| Generate a minimal PNG image to use as a test document. In practice, you would use a scanned document or photograph containing text. |
Contributor
Author
There was a problem hiding this comment.
let's get sample images into the project so we don't need this step
|
|
||
| ## Step 5: Detect text from local file bytes | ||
|
|
||
| Send the document directly as base64-encoded bytes instead of referencing S3. |
Contributor
Author
There was a problem hiding this comment.
let's lead with this method, and include the s3 option as a secondary example. don't include the command to create the S3 bucket in the tutorial, just note it as a prereq if you want to use that method.
| echo "Region: $REGION" | ||
|
|
||
| RANDOM_ID=$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 8 | head -n 1) | ||
| BUCKET_NAME="textract-tut-${RANDOM_ID}-${ACCOUNT_ID}" |
Contributor
Author
There was a problem hiding this comment.
check if the bucket stack exists and use that bucket if it's available.
|
|
||
| ## Step 1: Create a sample image | ||
|
|
||
| Generate a 100×100 gradient PNG using Python. The gradient gives Rekognition color data to analyze. |
Contributor
Author
There was a problem hiding this comment.
have a sample image in the repo and skip this step
090-comprehend: Replace placeholder 'Your text here' with interesting example text 103-textract: Lead with local file method, S3 as secondary option 103-textract: Script checks for prereq bucket stack before creating one 105-rekognition: Use repo sample image, remove Python image generation step sample-images/: Add placeholder images (to be replaced with real samples)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tutorials in this batch
All scripts tested end-to-end. Each tutorial includes a README with structured metadata and generation details appendix.
Test results