-
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
integ-tests-alpha: Can't use full SDKv3 package name in an awsApiCall #28844
Comments
Additionally it looks like having any non alphanumeric characters causes template validation errors with CloudFormation Outputs assertions: deploying... [3/3]
assertions: creating CloudFormation changeset...
❌ assertions failed: Error [ValidationError]: Template format error: Outputs name 'AssertionResultsAwsApiCallredshift-serverlessGetUsageLimitCommand6e1bf0d7444675e4ba3cb27c0240fd75' is non alphanumeric. |
Hi @dontirun
|
@sakurai-ryo Thank you! The PR should also fix the second part of the issue that I put in the comments with CloudFormation outputs not supporting |
@dontirun
|
Thanks for reaching out - based on the discussion here I've marked this as a documentation issue. |
When using the `awsApiCall` of integ-tests, several possible ways exist to specify the `service` and `api`. This is made possible by the following PR. https://github.com/aws/aws-cdk/pull/27313/files#diff-3ab65cbf843775673ff370c9c90deceba5f0ead8a3e016e0c2f243d27bf84609 However, currently, when specifying the package name or client name in SDK V3, the resource type in custom resource or the logical id in CloudFormation Output contains non-alphanumeric (`@`, `/`, `-`), which results in an error. For custom resources, the resource type can include alphanumeric characters and the following characters: `_@-` https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-customresource.html#aws-resource-cloudformation-customresource--remarks For `CfnOutput`, the logical id can include only alphanumeric. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/outputs-section-structure.html#outputs-section-syntax This PR fixes to remove these strings that cannot be included and allows users to specify the SDK v3 package name and client name when using `awsApiCall`. Closes #28844 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
When using the `awsApiCall` of integ-tests, several possible ways exist to specify the `service` and `api`. This is made possible by the following PR. https://github.com/aws/aws-cdk/pull/27313/files#diff-3ab65cbf843775673ff370c9c90deceba5f0ead8a3e016e0c2f243d27bf84609 However, currently, when specifying the package name or client name in SDK V3, the resource type in custom resource or the logical id in CloudFormation Output contains non-alphanumeric (`@`, `/`, `-`), which results in an error. For custom resources, the resource type can include alphanumeric characters and the following characters: `_@-` https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-customresource.html#aws-resource-cloudformation-customresource--remarks For `CfnOutput`, the logical id can include only alphanumeric. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/outputs-section-structure.html#outputs-section-syntax This PR fixes to remove these strings that cannot be included and allows users to specify the SDK v3 package name and client name when using `awsApiCall`. Closes #28844 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
When using the `awsApiCall` of integ-tests, several possible ways exist to specify the `service` and `api`. This is made possible by the following PR. https://github.com/aws/aws-cdk/pull/27313/files#diff-3ab65cbf843775673ff370c9c90deceba5f0ead8a3e016e0c2f243d27bf84609 However, currently, when specifying the package name or client name in SDK V3, the resource type in custom resource or the logical id in CloudFormation Output contains non-alphanumeric (`@`, `/`, `-`), which results in an error. For custom resources, the resource type can include alphanumeric characters and the following characters: `_@-` https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-customresource.html#aws-resource-cloudformation-customresource--remarks For `CfnOutput`, the logical id can include only alphanumeric. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/outputs-section-structure.html#outputs-section-syntax This PR fixes to remove these strings that cannot be included and allows users to specify the SDK v3 package name and client name when using `awsApiCall`. Closes #28844 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Describe the bug
Using the full SDKv3 package name (as described here #27313) causes the CDK to throw an error when attempting to run a test
Expected Behavior
Using the full SDKv3 package name does not throw an error
Current Behavior
The
/
in the full SDKv3 package name causes the naming constraints for the custom resource type name to errirError: Custom resource type name can only include alphanumeric characters and _@- (DeployAssert@SdkCall@aws-sdk/client-redshift-serverl)
Reproduction Steps
Possible Solution
Remove the
@aws-sdk/client-
from the full SDKv3 package name when naming the custom resource typeAdditional Information/Context
No response
CDK CLI Version
2.121.0 (build 9f2b78c)
Framework Version
No response
Node.js Version
v18.15.0
OS
Osx
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: