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

Could not set destination when creating MediaLive channel through lamda #5716

Open
1 of 2 tasks
Pra152tham opened this issue Nov 20, 2024 · 6 comments
Open
1 of 2 tasks
Assignees
Labels
bug This issue is a bug. closing-soon This issue will close in 4 days unless further comments are made. p2 This is a standard priority issue response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 10 days.

Comments

@Pra152tham
Copy link

Pra152tham commented Nov 20, 2024

Upcoming End-of-Support

  • I acknowledge the upcoming end-of-support for AWS SDK for Java v1 was announced, and migration to AWS SDK for Java v2 is recommended.

Describe the bug

I have created a lambda file that is supposed to create mideaLive Channel, The lamda function succesfully creates input Attachment, mediaPackage channel, but cannot set the destination. and gives following error.
Screenshot from 2024-11-20 18-42-51

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

MediaLive channel should have been created.

Current Behavior

giving me the following error:
Exception in thread "main" software.amazon.awssdk.services.medialive.model.UnprocessableEntityException: outputGroups[0].outputGroupSettings.destination.channelId MediaPackage channel ID is invalid. The ID can have numbers, letters, underscores, and dashes. The ID is case sensitive.

Reproduction Steps

public static CreateChannelResponse createMediaLiveChannel3(MediaLiveClient mediaLiveClient, String channelName, String inputId,String mediaPackageChannelArn) {
        try {
            CreateChannelRequest channelRequest = CreateChannelRequest.builder()
                    .name(channelName)
                    .inputAttachments(Collections.singletonList(
                            InputAttachment.builder()
                                    .inputId(inputId)
                                    .inputAttachmentName("LiveStream2")
                                    .inputSettings(InputSettings.builder()
                                            .deblockFilter(InputDeblockFilter.DISABLED)
                                            .denoiseFilter(InputDenoiseFilter.DISABLED)
                                            .filterStrength(1)
                                            .inputFilter(InputFilter.AUTO)
                                            .smpte2038DataPreference(Smpte2038DataPreference.IGNORE)
                                            .sourceEndBehavior(InputSourceEndBehavior.CONTINUE)
                                            .build())
                                    .build()))
                    .inputSpecification(InputSpecification.builder()
                            .codec(InputCodec.AVC)
                            .maximumBitrate(InputMaximumBitrate.MAX_20_MBPS)
                            .resolution(InputResolution.HD)
                            .build())
                    .encoderSettings(EncoderSettings.builder()
                            .audioDescriptions(Arrays.asList(
                                    AudioDescription.builder()
                                            .audioSelectorName("default")
                                            .name("audio_82lool")
                                            .build(),
                                    AudioDescription.builder()
                                            .audioSelectorName("default")
                                            .name("audio_l1c2h")
                                            .build()))
                            .videoDescriptions(Arrays.asList(
                                    VideoDescription.builder()
                                            .name("video_q7t5tl")
                                            .width(1280)
                                            .height(720)
                                            .codecSettings(VideoCodecSettings.builder()
                                                    .h264Settings(H264Settings.builder()
                                                            .framerateNumerator(30000)
                                                            .framerateDenominator(1001)
                                                            .gopSize(90.0)
                                                            .rateControlMode(H264RateControlMode.CBR)
                                                            .scanType(H264ScanType.PROGRESSIVE)
                                                            .build())
                                                    .build())
                                            .build(),
                                    VideoDescription.builder()
                                            .name("video_d6yva3")
                                            .width(1920)
                                            .height(720)
                                            .codecSettings(VideoCodecSettings.builder()
                                                    .h264Settings(H264Settings.builder()
                                                            .framerateNumerator(30000)
                                                            .framerateDenominator(1001)
                                                            .gopSize(90.0)
                                                            .rateControlMode(H264RateControlMode.CBR)
                                                            .scanType(H264ScanType.PROGRESSIVE)
                                                            .build())
                                                    .build())
                                            .build()))
                            .outputGroups(Collections.singletonList(
                                    OutputGroup.builder()
                                            .name("LiveStream")
                                            .outputGroupSettings(OutputGroupSettings.builder()
                                                    .mediaPackageGroupSettings(MediaPackageGroupSettings.builder()
                                                            .destination(OutputLocationRef.builder()
                                                                    .destinationRefId("channelId")
                                                                    .build())
                                                            .build())
                                                    .build())
                                            .outputs(Arrays.asList(
                                                    Output.builder()
                                                            .outputName("7iwvon")
                                                            .audioDescriptionNames("audio_82lool")
                                                            .videoDescriptionName("video_q7t5tl")
                                                            .outputSettings(OutputSettings.builder()
                                                                    .mediaPackageOutputSettings(MediaPackageOutputSettings.builder().build())
                                                                    .build())
                                                            .build(),
                                                    Output.builder()
                                                            .outputName("nhgtaj")
                                                            .audioDescriptionNames("audio_l1c2h")
                                                            .videoDescriptionName("video_d6yva3")
                                                            .outputSettings(OutputSettings.builder()
                                                                    .mediaPackageOutputSettings(MediaPackageOutputSettings.builder().build())
                                                                    .build())
                                                            .build()))
                                            .build()))
                            .timecodeConfig(TimecodeConfig.builder()
                                    .source(TimecodeConfigSource.EMBEDDED)
                                    .build())
                            .build())
                    .roleArn("arn:aws:iam::236827918545:role/MediaLiveAccessRole") // Replace with your IAM Role ARN
                    .build();

            CreateChannelResponse channelResponse = mediaLiveClient.createChannel(channelRequest);

            System.out.println("MediaLive Channel created successfully!");
            return channelResponse;
        } catch (MediaLiveException e) {
            System.err.println("Error creating MediaLive Channel: " + e.awsErrorDetails().errorMessage());
            throw e;
        }
    }

Possible Solution

No response

Additional Information/Context

No response

AWS Java SDK version used

21

JDK version used

21

Operating System and version

ubuntu 20.04

@Pra152tham Pra152tham added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Nov 20, 2024
@debora-ito
Copy link
Member

Moving to the Java SDK 2.x repo.

@debora-ito debora-ito transferred this issue from aws/aws-sdk-java Nov 20, 2024
@Pra152tham
Copy link
Author

I did not understand what you are trying to say

@debora-ito
Copy link
Member

By looking at the terminal in your screenshot, you created the destination MediaPackage channel unique-media-package-channel-1 immediately before calling the MediaLive CreateChannel API. If that's the case, the error might be due to the MediaPackage channel is not yet available as a resource at the time the MediaLive CreateChannel request is sent.

Try calling MediaPackage ListChannels to confirm the newly created channel is present in the response, before moving on to the MediaLive CreateChannel request.

If this doesn't solve the issue, please provide the verbose wirelogs (instructions here) with request IDs of the MediaLive CreateChannel problematic call, hopefully it will provide more insights. Make sure to redact any sensitive information, like access keys, before sharing the logs here.

@debora-ito debora-ito added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 10 days. p2 This is a standard priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Nov 22, 2024
@debora-ito debora-ito self-assigned this Nov 22, 2024
@Pra152tham
Copy link
Author

I have verified the mediaPackage is created before the 'createMediaLiveChannel3' function. but still the same error appears

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 10 days. label Nov 22, 2024
@debora-ito
Copy link
Member

If this doesn't solve the issue, please provide the verbose wirelogs (instructions here) with request IDs of the MediaLive CreateChannel problematic call, hopefully it will provide more insights. Make sure to redact any sensitive information, like access keys, before sharing the logs here.

@debora-ito debora-ito added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 10 days. label Nov 23, 2024
Copy link

github-actions bot commented Dec 3, 2024

It looks like this issue has not been active for more than five days. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please add a comment to prevent automatic closure, or if the issue is already closed please feel free to reopen it.

@github-actions github-actions bot added the closing-soon This issue will close in 4 days unless further comments are made. label Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. closing-soon This issue will close in 4 days unless further comments are made. p2 This is a standard priority issue response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 10 days.
Projects
None yet
Development

No branches or pull requests

2 participants