How to create a Lambda Function in Python 2.7 to Create, Reboot, Delete, Modify a ElastiCache Redis? -


currently i'm working on lambda function create, reboot, delete, modify elasticache redis using python 2.7 script.
need iam rules , policies also.
i'm done ec2, rds stop & start actions. have not seen solutions elasticache redis, can people provide me scripts or solutions @ least delete, create elasticache redis.

you can use aws elasticache python sdk create, reboot, delete & modify using boto3.

example:

import boto3 client = boto3.client('elasticache') response = client.create_cache_cluster(     cacheclusterid='string',     replicationgroupid='string',     azmode='single-az'|'cross-az',     preferredavailabilityzone='string',     preferredavailabilityzones=[         'string',     ],     numcachenodes=123,     cachenodetype='string',     engine='string',     engineversion='string',     cacheparametergroupname='string',     cachesubnetgroupname='string',     cachesecuritygroupnames=[         'string',     ],     securitygroupids=[         'string',     ],     tags=[         {             'key': 'string',             'value': 'string'         },     ],     snapshotarns=[         'string',     ],     snapshotname='string',     preferredmaintenancewindow='string',     port=123,     notificationtopicarn='string',     autominorversionupgrade=true|false,     snapshotretentionlimit=123,     snapshotwindow='string',     authtoken='string' ) 

for more details on parameters refer this link.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -