-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
use FnJoin in bucketName property #624
Comments
You are correct. The S3 bucket name validation was not written with the use of Tokens in mind. We wanted to validate that you weren't making any mistakes against this, but the fact is that with Tokens we cannot actually check this (since the value may be unavailable until deployment time), and now that Tokens may be embedded into strings it doesn't actually make any sense to validate anymore. The only thing to do for now is get rid of that validation. |
I agree with you since there are other objects that have no name validation like roles and IMHO at the moment is more useful being able to create referenced name than having the validation in place since in any case failing it will result in a CloudFormation error during the deployment. Of course having both the validation and the token would be the best, but for me getting rid of the name validation on buckets is enough for now. Thank you for the replay, and keep up the good work! |
Now that Tokens can be stringified, they can be inserted into parameters like `bucketName`, which can lead to an input string like `"bucket-name-${Token[TOKEN.0]}"`. We can't properly validate these strings anymore. Fixes #624.
Now that Tokens can be stringified, they can be inserted into parameters like `bucketName`, which can lead to an input string like `"bucket-name-${Token[TOKEN.0]}"`. We can't properly validate these strings anymore. Fixes #624.
Hi everyone,
I am using a cdk.Parameter object to define the stage of my CloudFormation stack and I would like to use this object to define a bucket name, doing so I'll have a bucket related to production, dev, test, etc...
In order to achieve this result I am doing as follow:
where
return a cdk.Parameter object.
When I run
I receive this error:
I have tried to comment the following line from @aws-cdk/aws-s3/lib/bucket.js:
Doing so I obtain the desired result in the output template which is:
Am I missing something or there is a problem in the s3 bucket's name verifcation process?
Thank you.
The text was updated successfully, but these errors were encountered: