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

register.sh fails if uuidgen isn't installed #46

Closed
lavigne opened this issue Nov 9, 2022 · 1 comment
Closed

register.sh fails if uuidgen isn't installed #46

lavigne opened this issue Nov 9, 2022 · 1 comment

Comments

@lavigne
Copy link

lavigne commented Nov 9, 2022

Because uuidgen is used to name the S3 bucket used for installation, running register.sh fails if uuidgen isn't installed. The error message the user receives is:

Invalid bucket name "": Bucket name must match the regex "^[a-zA-Z0-9.\-_]{1,255}$" or be an ARN matching the regex "^arn:(aws).*:(s3|s3-object-lambda):[a-z\-0-9]*:[0-9]{12}:accesspoint[/:][a-zA-Z0-9\-.]{1,63}$|^arn:(aws).*:s3-outposts:[a-z\-0-9]+:[0-9]{12}:outpost[/:][a-zA-Z0-9\-]{1,63}[/:]accesspoint[/:][a-zA-Z0-9\-]{1,63}$"

It looks like there used to be a --bucket-name parameter that could be passed in but that parameter is commented out in the script. Perhaps we could add the parameter back as a workaround for when uuidgen isn't available? It might also be nice if the error message could explain to the user a little more clearly why it's failing. Currently the message is fairly confusing because it talks about an invalid bucket name, but the user hasn't provided a bucket name so it's hard to know what corrective action to take without opening up the script.

@shantgup
Copy link
Collaborator

Thank you for bringing this to our attention. For now, I will add a note to the README listing out the CLI commands used by the script.

I removed the --bucket-name parameter because often times the bucket name would already be in use and that would fail the script. Also, I wanted to reduce the number of input parameters passed to the script, making it simpler and more automated for users.

However, I can add it back to the script with the next release, and also add catch statements with meaningful error messages if any of the CLI commands aren't available.

For now, I recommend you install uuidgen and proceed with the resource registration.

Thank you again, your feedback is highly appreciated.

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

No branches or pull requests

2 participants