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

RuntimeValue code uses invalid '@' char #151

Closed
fulghum opened this issue Jun 20, 2018 · 2 comments · Fixed by #208
Closed

RuntimeValue code uses invalid '@' char #151

fulghum opened this issue Jun 20, 2018 · 2 comments · Fixed by #208
Assignees

Comments

@fulghum
Copy link
Contributor

fulghum commented Jun 20, 2018

The CDK User Guide includes a sample for using RuntimeValues:

const topic = new Topic(this, 'MySnsTopic', {
  topicName: 'MyTopic'
});

const RTV_PACKAGE = 'com.amazonaws.rtvtest';

const runtimeValues = [
  new RuntimeValue(this, 'MyRuntimeValue', {
    package: RTV_PACKAGE,
    value: topic.topicArn
})];

This generates a 4xx error from CFN:

[5/7] Wed Jun 20 2018 10:09:10 GMT-0700 (PDT)  CREATE_FAILED       [AWS::SSM::Parameter] MyRuntimeValueParameterDF736969 Parameter name: can't be prefixed with "ssm" (case-insensitive). If formed as a path, it can consist of sub-paths divided by slash symbol; each sub-path can be formed as a mix of letters, numbers and the following 3 symbols .-_ (Service: AWSSimpleSystemsManagement; Status Code: 400; Error Code: ValidationException; Request ID: 6b273d3d-3519-400d-a2d7-953a61891913)
MyRuntimeValueParameterDF736969 was created at: /CdkPrivateBetaTestDrive7Stack/MyRuntimeValue/Parameter
        new RuntimeValue (/Users/fulghum/Projects/CDK-PrivateBeta-TestDrive7/node_modules/@aws-cdk/rtv/lib/rtv.js:9:9)
        \_ new CdkPrivateBetaTestDrive7Stack (/Users/fulghum/Projects/CDK-PrivateBeta-TestDrive7/bin/cdk-private_beta-test_drive7.js:26:9)

Here's what CDK is synthesizing for the CFN template:

    MyRuntimeValueParameterDF736969:
        Type: 'AWS::SSM::Parameter'
        Properties:
            Type: String
            Value:
                Ref: CdkPrivateBetaTestDrive7Topic0A32D738
            Name:
                'Fn::Join':
                    - ""
                    -
                        - /rtv/
                        -
                            Ref: 'AWS::StackName'
                        - /
                        - com.amazonaws.rtvtest
                        - '@'
                        - MyRuntimeValue

The '@' char doesn't seem to be valid for SSM property names.

Source line:
https://github.com/awslabs/aws-cdk/blob/master/packages/%40aws-cdk/rtv/lib/rtv.ts#L25

@eladb
Copy link
Contributor

eladb commented Jun 20, 2018

Thanks for reporting. This library definitely needs some 🤗 -- we haven't really tested it fully yet.

eladb pushed a commit that referenced this issue Jun 20, 2018
@Doug-AWS
Copy link
Contributor

I commented-out the RuntimeValue section for now. It's part of #142.

@eladb eladb self-assigned this Jun 21, 2018
eladb pushed a commit that referenced this issue Jun 30, 2018
…M parameter

"@" is not allowed in SSM parameter keys.

Obvsiouly this has never been tested properly, so add an integration test.

Fixes #151
@eladb eladb closed this as completed in #208 Jul 2, 2018
eladb pushed a commit that referenced this issue Jul 2, 2018
Use "/" instead of "@" to delimit package and name in SSM parameter since "@" is not allowed in SSM parameter keys. Obvsiouly this has never been tested properly, so add an integration test.

Fixes #151
comcalvi pushed a commit that referenced this issue Jun 13, 2023
…151)

Adding support for the new encryption mode DSSE (aws:kms:dsse). DSSE is a new encryption mode which does double encryption with the kms generated data key.

Co-authored-by: Yuandong-Chen <zyz2118acz@gwmail.gwu.edu>
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

Successfully merging a pull request may close this issue.

3 participants