aws resource types vs custom resources


My customer is looking to enable Infra As Code for some 3rd-party resources external to AWS using Cloudformation. It looks like there are 2 ways to do this:

This blog posts appears to heavily favor resource types over custom resources.

Using cfn-cli to run through an example using a resource type in Go, but the generator crashes when running “cfn-cli init”. Seems to be a Windows-specific issue.

They looked for an already-generated example of a Go resource type on Github under the aws-cloudformation org, but couldn’t find any. It was also unclear whether interactions with resource types using the CDK is possible. Is this possible using the CfnResource construct?

Are resource types really ready for prime-time, or should they fall back to custom resources?


asked 3 years ago173 views
1 Answer
Accepted Answer


Basically custom resource timeout is capped to 1 hour.

But even though custom resource is capped to 1 hour, lambda can only run for 15 mins. So basically for lambda backed CR its 15 mins. SNS backed CR signal should be sent within 59 minutes and 59 seconds but as Christian suggested, you can make use of CloudFormation registry it can be upto 36 hours.

In summary - Lambda backed CR - 15mins SNS backed CR - 1 hour CFN Registry - upto 36 hours

Yes, resource types are ready for prime-time. Custom resources have their own use-case.

If their use-case requires compute/logic that takes less than 1 hour to execute, then custom resource would be the go-to solution.

But in case they want to have a pure resource kind of experience which also does drift detection, etc. then its better to use CloudFormation registry.

Hope this helps :)

answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions