Questions tagged with AWS Lambda

Content language: English

Sort by most recent

Browse through the questions and answers listed below or filter and sort to narrow down your results.

C++ Lambda - segmentation fault

Hi, I am trying to create a lambda function with access to an S3 bucket and allow operations to the bucket such as create and delete files (the usual I assume). I installed (on my windows pc) a WSL instance of ubuntu 20.04 and I installed AWS CLI according to: https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.htm I then followed the guide to configure and set access keys: https://docs.aws.amazon.com/cli/latest/userguide/getting-started-quickstart.html Now, I followed the guide on creating a hello world lambda function in c++: https://aws.amazon.com/blogs/compute/introducing-the-c-lambda-runtime/ The first example, all is fine and the lambda function successfully runs from the aws console without any errors or warnings. Now, when I continue the same guide to the "beyond hello", things start going wrong. I successfully setup all what was needed and installed the SDK's as required. Now, when I try to make the project, the compiler stops with this message: ``` cpp-encoder-example/main.cpp:78:56: error: no matching function for call to ‘Aws::S3::S3Client::S3Client(std::shared_ptr<Aws::Auth::EnvironmentAWSCredentialsProvider>&, Aws::Client::ClientConfiguration&)’ 78 | S3::S3Client client(credentialsProvider, config); ``` followed by a few lines with this note where n = 5, 4 and 1. (line number is of the first warning thrown) ``` include/aws/s3/S3Client.h:96:9: note: candidate expects n arguments, 2 provided ``` Now, when I remove 'credentialsProvider' from S3::S3Client client(credentialsProvider, config); in main.cpp, all does compile. (should that work?) However, I then continue to create the lambda function and when created and I press test in the aws console, it stops with: ``` s2n_init() failed: 402653268 (Failed to load or unload an openssl provider) Fatal error condition occurred in /home/username/aws-sdk-cpp/crt/aws-crt-cpp/crt/aws-c-io/source/s2n/s2n_tls_channel_handler.c:197: 0 && "s2n_init() failed" Exiting Application No call stack information available START RequestId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx Version: $LATEST 2022-11-21T09:02:07.642Z xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx Task timed out after 1.02 seconds END RequestId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx REPORT RequestId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx Duration: 1015.50 ms Billed Duration: 1000 ms Memory Size: 128 MB Max Memory Used: 16 MB ``` Now, for some reason I think something is failing during compile time with the certificates. What certificates may I not have set correctly, what installation step might I have missed? Have I failed at something else and can someone give me a pointer (pun not intended) to what to do / try? Ps. I'm not sure what tags to add since sdk or c++ are not included in them.
1
answers
0
votes
22
views
asked 14 days ago

Proper CMAF config for media convert

I am using AWS lambda to create a job for media convert (using python). I was convert an input video in CMAF H265 format, but I am unable to figure out the correct settings for this. The createJob function returns an error : `botocore.errorfactory.BadRequestException: An error occurred (BadRequestException) when calling the CreateJob operation: /outputGroups/0/outputs/0: Should match exactly one schema defined in "oneOf"` The error displayed in log files of lambda has only this information and does not mention the exact fields which are missing the validation. When i compare my config with the sdk code, I am unable to find the possible error. Please help here. Since the error is in outputs, including the corresponding object: ``` { "ContainerSettings": { "Container": "CMFC", "CmfcSettings": { "IFrameOnlyManifest": "EXCLUDE" } }, "VideoDescription": { "Width": 468, "ScalingBehavior": "DEFAULT", "Height": 264, "TimecodeInsertion": "DISABLED", "AntiAlias": "ENABLED", "Sharpness": 50, "CodecSettings": { "Codec": "H_265", "H265Settings": { "InterlaceMode": "PROGRESSIVE", "NumberReferenceFrames": 3, "GopClosedCadence": 1, "GopSize": 90, "Slices": 1, "GopBReference": "DISABLED", "SlowPal": "DISABLED", "SpatialAdaptiveQuantization": "ENABLED", "TemporalAdaptiveQuantization": "ENABLED", "FlickerAdaptiveQuantization": "DISABLED", "FramerateControl": "INITIALIZE_FROM_SOURCE", "RateControlMode": "QVBR", "QvbrSettings": { "QvbrQualityLevel": 7 }, "MaxBitrate": 500000, "CodecProfile": "MAIN_HIGH", "CodecLevel": "LEVEL_3", "Telecine": "NONE", "MinIInterval": 0, "AdaptiveQuantization": "HIGH", "SceneChangeDetect": "ENABLED", "QualityTuningLevel": "SINGLE_PASS_HQ", "FramerateConversionAlgorithm": "DUPLICATE_DROP", "UnregisteredSeiTimecode": "DISABLED", "GopSizeUnits": "FRAMES", "ParControl": "INITIALIZE_FROM_SOURCE", "NumberBFramesBetweenReferenceFrames": 2, "WriteMp4PackagingType":"HEV1" } }, "AfdSignaling": "NONE", "DropFrameTimecode": "ENABLED", "RespondToAfd": "NONE", "ColorMetadata": "INSERT" }, "AudioDescriptions": [ { "AudioTypeControl": "FOLLOW_INPUT", "CodecSettings": { "Codec": "AAC", "AacSettings": { "AudioDescriptionBroadcasterMix": "NORMAL", "Bitrate": 96000, "RateControlMode": "CBR", "CodecProfile": "LC", "CodingMode": "CODING_MODE_2_0", "RawFormat": "NONE", "SampleRate": 48000, "Specification": "MPEG4" } }, "LanguageCodeControl": "FOLLOW_INPUT" } ], "NameModifier": "_468" } ```
1
answers
0
votes
22
views
asked 14 days ago