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

cfn-guard-lambda: document how to pass YAML templates and multi-line Guard rules #209

Open
mrinaudo-aws opened this issue Oct 19, 2021 · 2 comments
Labels
documentation Improvements or additions to documentation needs-research

Comments

@mrinaudo-aws
Copy link

Describe the issue
Document how to pass YAML templates and multi-line Guard rules as inputs to cfn-guard-lambda. For example, given a sample YAML template such as:

---
AWSTemplateFormatVersion: '2010-09-09'
Description: Sample template
Resources:
  SampleVolume:
    Type: AWS::EC2::Volume
    Properties:
      Encrypted: true
      Size: 10

and a sample Guard rule:

AWS::EC2::Volume {
    Properties {
        Encrypted == true
        Size <= 10
    }
}

document and provide an example of the expected format to use to pass information (as in above examples) as part of the payload structure.

Any examples

Operating System:

OS Version

Additional context

@mrinaudo-aws mrinaudo-aws added guidance documentation Improvements or additions to documentation labels Oct 19, 2021
@akumar-99
Copy link

AWS CloudFormation Guard User Guide
Page number 7 under the heading To build and run Guard as a Lambda function shows us that rules can be entered as string format unlike other documentations where list input are shown and next heading To call the Lambda function request structure says about string version of the rule set file.
I have tried implementing this but was unable to get to a solution. Some more information about this will be very helpful. Thanks in advance.

@akshayrane
Copy link
Collaborator

@mrinaudo-aws Understood, we will add some examples in our README for lambda that explains this use case better.

Some of the approaches that come to mind include processing multi-line input in bash first and then supplying them as args to the lambda invoke command. But we'll research more to see if there's a more cleaner way of doing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation needs-research
Projects
None yet
Development

No branches or pull requests

4 participants