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

Handle Custom Resources #15

Open
rajiv-g opened this issue Feb 24, 2022 · 2 comments
Open

Handle Custom Resources #15

rajiv-g opened this issue Feb 24, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@rajiv-g
Copy link

rajiv-g commented Feb 24, 2022

Hi,
I am using the Custom Resource backed by Lambda function in the same template.

ExampleS3PolicyRun:
    Type: Custom::ExampleS3Policy
    Condition: CreateExampleS3Bucket
    Properties:
      ServiceToken: !GetAtt ExampleS3PolicyFunction.Arn
      Environment: !Ref EnvironmentName
      ExampleS3PolicyMappings: !Ref ExampleS3PolicyMappings

But I got

ERROR: Invalid resource type: Custom::ExampleS3Policy
@mluttrell
Copy link
Contributor

Hi, thank you for opening this issue. It looks like you have an IAM policy that references this custom resource?

This is not something that the tool currently supports, though the error message could be better. The problem is that the tool could not know what type of ARN your custom resource generates since it could be any AWS resource. The tool throws an error in this type of situation so that a bad actor couldn't use this strategy as a way to get around policy validation checks.

I think what could be added in the future is some sort of configuration that allows you to intentionally ignore situations like this, but that does not exist today.

@rajiv-g
Copy link
Author

rajiv-g commented Feb 28, 2022

@mluttrell Thanks. Yes will be helpful if we have option to silently ignore this situation.

@mluttrell mluttrell added the enhancement New feature or request label Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants