aws / aws/aws-cdk

MediaPackage: speke 2 configuration error

Open
#26,207 7 comments 0 reactions 0 assignees View on GitHub
@aws-cdk/aws-mediapackage bug effort/small needs-cfn p3
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

### Describe the bug

The speke 2 configuration "EncryptionContractConfiguration" is not correctly converted to the cloud formation template, giving an error when deploying.

### Expected Behavior

The cf template should include the speke 2 configurations and the deploy show set speke 2 configuration.

### Current Behavior

When generating a cmaf or dash mediapackage with the following information:

```
spekeKeyProvider: {
roleArn: "arn",
systemIds: "xxxxxxxxxxx",
url: "https://xxx.xx",
resourceId: `resource-cmaf`,
encryptionContractConfiguration: {
presetSpeke20Audio: "PRESET-AUDIO-1",
presetSpeke20Video: "PRESET-VIDEO-1",
},
},
```
the generated cloudformation template doesn't include the preset information:
```
"SpekeKeyProvider": {
"EncryptionContractConfiguration": {},
"ResourceId": "resource-xxxx",
"RoleArn": {
"Fn::ImportValue": "role"
},
"SystemIds": [
"xxxxx"
],
```
And when we deploy we get the following error:
```
Resource handler returned message: "Model validation failed (#: #: only 1 subschema matches out of 2)
#/CmafPackage/Encryption/SpekeKeyProvider/EncryptionContractConfiguration: 2 schema violations found (#/CmafPackage/Encryption/SpekeKeyProvider/EncryptionContractConfiguration)" (RequestToken: a53b01e3-b50a-3ce3-4cd8-6550561eda09, HandlerErrorCode: InvalidRequest)
```

### Reproduction Steps

Just create a media package endpoint with speke 2 configurations and check the generated cf template.

### Possible Solution

_No response_

### Additional Information/Context

_No response_

### CDK CLI Version

2.86.0 (build 1130fab)

### Framework Version

2.86

### Node.js Version

v18.16.0

### OS

windows 11

### Language

Typescript

### Language Version

5.1.6

### Other information

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the TypeScript MediaPackage endpoint configuration using SpekeKeyProvider and generate its CloudFormation template. Compare the emitted EncryptionContractConfiguration with the supplied presetSpeke20Audio and presetSpeke20Video values, then verify that a deployment accepts the generated template and preserves the SPEKE 2 settings.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
cloud, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.