Skip to content

tr: Illegal byte sequence on rds-s3 create stack #4

Description

@justinkraus

Got "tr: Illegeal byte sequence error" on step 6 in the readme (OSX 12.2.1 Monterey):
aws cloudformation create-stack --stack-name rds-s3 --template-body file://rds_s3.yaml --capabilities CAPABILITY_NAMED_IAM --parameters ParameterKey=BucketName,ParameterValue=$(head /dev/urandom | tr -dc a-z0-9 | head -c10)

Adding LC_ALL=C before tr corrects this:
aws cloudformation create-stack --stack-name rds-s3 --template-body file://rds_s3.yaml --capabilities CAPABILITY_NAMED_IAM --parameters ParameterKey=BucketName,ParameterValue=$(head /dev/urandom | LC_ALL=C tr -dc a-z0-9 | head -c10)

I'm not sure how this impacts the command on other operating systems or I'd propose a PR. See comments on accepted answer here: https://unix.stackexchange.com/questions/45404/why-cant-tr-read-from-dev-urandom-on-osx

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions