value_from dynamo query
See original GitHub issueCurrently value_from
supports http requests and s3 buckets, but this can cause problems with large files. it would be nice to have the option to store these large files in dynamo and to be able to query it using value_from.
for example
policies:
- name: vpc-with-dynamodb-value-from
resource: vpc
filters:
- type: value
key: 'tag:Name'
value_from:
url: 'dynamodb:us-east-1:644160558196:table/test'
format: json
query:
KeyConditionExpression: '#n2 = :v1'
FilterExpression: 'contains(#n0.#n1, :v0)'
ExpressionAttributeNames: {'#n0': 'exceptions', '#n1': 'exception1', '#n2': 'test'}
ExpressionAttributeValues: {':v0': 'testing-vpc', ':v1': '1111111111' }
expr: '[0].exceptions.exception1'
op: in
Issue Analytics
- State:
- Created 3 years ago
- Comments:21 (9 by maintainers)
Top Results From Across the Web
Query - Amazon DynamoDB - AWS Documentation
Query · DynamoDB calculates the number of read capacity units consumed based on item size, not on the amount of data that is...
Read more >Getting the latest value from DynamoDB table - Stack Overflow
I was able to figure it out so thought I'd post it here for anyone looking for the answer. The way I had...
Read more >Get and Put data Using Lambda and DynamoDB, simple and ...
Our main goal is to READ some values (data) from DynamoDB and also ... to let the NodeJS compiler know that we will...
Read more >Using Amazon DynamoDb with the AWS .NET API Part 6
In this post we'll investigate how to run queries against the data set in a DynamoDb table. Like in the two posts before...
Read more >Query DynamoDB table using API Gateway - YouTube
Welcome to part 35 of the tutorial series on Amazon API Gateway. In this tutorial, how to query the DynamoDB table using API...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
your aws resources are already available over public http, the difference is protecting the access via IAM for authn/authz, you can do the same with api gw (iam auth).
thats two different native solutions, break up your s3 files to not be full database dumps but policy/env specific values, or front the data with an api gw/http endpoint. for the later we can add support for an auth mode (iam) to sign requests.
I’ve been thinking on this, and really just giving an outsider’s perspective to the approach.
I can understand the desire to move from a single large file to particular database queries. However I don’t think that custodian is the right place to provide that functionality.
It seems to me that a simple approach would be to have an api gateway -> lambda that could produce the HTTP response that the value_from filter already understands would be the best apprach. This should be pretty simple to implement, and keeps the database interactions isolated from custodian.
Having DB queries in policies feels like the wrong thing to me.