Skip to content

Commit

Permalink
updating example in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
scottvdp committed Oct 20, 2015
1 parent f1ebe45 commit 55cbb1e
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,13 @@
# pycfn-custom-resource
A helper object to create AWS Cloudformation Lambda-backed CustomResources in python

Please see example in handler.py. Update example.template accordingly.

``` shell
./build_lambda_zip.sh
aws s3 cp ./handler.zip s3://bucket/prefix/
aws s3 cp ./example.template s3://bucket/prefix/
aws cloudformation create-stack --stack-name somestack \
--template-url https://s3.amazonaws.com/bucket/prefix/example.template \
--capabilities CAPABILITY_IAM
```
Please see [pycfn_elasticsearch](https://github.com/elelsee/pycfn-elasticsearch) for an example.

### Example
``` python
import customresource
import logging
log = logging.getLogger()
log.setLevel(logging.INFO)
from pycfn_custom_resource.lambda_backed import CustomResource

class myCustomResource(customresource.CustomResource):
class myCustomResource(CustomResource):
"""Example of how to override the methods for Resource Events"""
def __init__(self, event):
super(myCustomResource, self).__init__(event)
Expand Down

0 comments on commit 55cbb1e

Please # to comment.