AWS Lambda: Serverless Image HandlerCustom resource
Galniyaz opened this issue · 1 comments
Hello.
I am new to the topic of Serverless Image Handler on AWS.
I have a question about the ready-made solution serverless-image-handler .
When importing it, 2 lambda functions are created and one of them with the description Serverless Image Handler (v6.2.5): Custom resource
.
Question: What is this function used for? I see that in Monitoring tools
there is no data on the operation of this function.
I didn't find any answers in the documentation
Thank you
Hi @Galniyaz,
The custom resource is responsible for performing certain actions that can't always be managed by a CloudFormation stack. It operates only on stack creation/update. The following actions are currently performed by the custom resource handler:
- Placing the config file used to tell the demo ui the URL for your backend cloudfront API
- Creating a common UUID used to ensure the naming in your stack is unique
- Checking the source buckets provided to ensure you have access to read from them
- Ensuring you have access to read the fallback image if provided
- Validating the secret name and key map to a valid secret if signatures are enabled
- Sending anonymous metrics about the deployment if enabled
- Creating the CloudFront logging bucket (CloudFront isn't able to place logs in buckets hosted in any Opt-in regions, as a result, we have to create this dynamically, check if the deployment is in an opt in region, and place the bucket in us-east-1 as a result)
We'll evaluate providing more info in the IG surrounding this topic.
Thanks for your feedback :)
Simon