aws-scripts | Some useful AWS scripts | AWS library
kandi X-RAY | aws-scripts Summary
kandi X-RAY | aws-scripts Summary
Some useful AWS scripts
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- List reserved instances
- List EC2 volumes
- Create a snapshot of a volume
- Fsync database
- List EC2 instances
- Create events in AWS Cloud
- Return the first available hostname in route53
- Delete a hostname record from Route53
- Set the hostname in Route53
- Dump a mongodump database
- Create a boto3 session
- List all load balancers
- Prints orphaned snapshots
- Get message from SQS queue
- Returns private ip address
- Get local DNS hostname
- Get public DNS hostname
- Download a file from S3
- Snap a volume
- Return public ip address
aws-scripts Key Features
aws-scripts Examples and Code Snippets
Community Discussions
Trending Discussions on aws-scripts
QUESTION
I want to set cloudwatch alerts on my production server but getting dependency errors for libwww-perl while resolving it is saying "No space left on device" though there is space. please let me know what is that I am missing.
ubuntu@ip-172-21-0-17:/opt/aws-scripts-mon$ ./mon-put-instance-data.pl
...ANSWER
Answered 2019-Dec-17 at 04:40Your inode usage is high. Which basically means that you have a lot of small files on your server (since disk is still not full).
So you need to find these small files and delete old / not required ones.
Meanwhile, as a quick workaround, you may try autoremoving unneeded packages.
QUESTION
I have already setup a cron job to send diskspaceavailable to cloudwatch metrics but when I try to create cloudwatch alarm for diskspaceavailable, i'm not able to get it to work because of the dimensions that i'm using within the alarm creation.
diskspaceavailable setup commands
...ANSWER
Answered 2018-Jul-19 at 06:48First thing I see is that you're missing the value for Filesystem dimension. Should be something like:
QUESTION
We have several AWS test environments with LoadBalancers. This cost a lot of money as LoadBalancers can not be turned off. I therefor tries to create a script to Back them of and restore them. I tryed this:
...ANSWER
Answered 2018-Mar-08 at 09:44You should be looking at using CloudFormation template to launch and turn off any AWS Resources. Cloudformer is helpful for creating templates for existing resources.
If you still need to use the CLI, you can generate CLI Skeleton JSON that outlines all of the parameters that can be specified for the operation. you can then fill up the values and then create the load balancers
aws elb create-load-balancer --generate-cli-skeleton
QUESTION
I am running a python script on a Linux EC2 instance (the standard AMI) and I am having trouble executing a python script through the Crontab. I have another cron job already running and followed the same format. I think I'm missing something simple, but have had trouble identifying the cause. Here is what pops up when I run crontab -e
ANSWER
Answered 2017-Nov-15 at 16:44in your line you are looking for
the python application inside your scripts folder
I guess this is not what you intended. Try this out:
QUESTION
I want to create a cloudwatch alarm for the diskspace-utilization. I've folowed the AWS doc below
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/mon-scripts.html
It is creating the cron on my instance and I've checked my system log as well.
Sep 22 12:20:01 ip-#### CRON[13921]: (ubuntu) CMD (~/volumeAlarm/aws-scripts-mon/mon-put-instance-data.pl --disk-space-util --disk-space-avail --disk-space-used --disk-path=/ --from-cron)
Sep 22 12:20:13 ip-#### CRON[13920]: (ubuntu) MAIL (mailed 1 byte of output; but got status 0x004b, #012)
also manually running the command,
./mon-put-instance-data.pl --disk-space-util --disk-space-avail --disk-space-used --disk-path=/
shows the result,
print() on closed filehandle MDATA at CloudWatchClient.pm line 167.
Successfully reported metrics to CloudWatch. Reference Id:####
But there is no metrics in the aws console, So that I can set the alarm,
Please help, If someone solved the problem.
...ANSWER
Answered 2017-Oct-12 at 10:07CloudWatch scripts will get the instance's meta data and write it to a local file /var/tmp/aws-mon/instance-id, if the file or folder has incorrect permission that the script cannot write to file /var/tmp/aws-mon/instance-id, then it may throw error like "print() on closed filehandle MDATA at CloudWatchClient.pm line 167". Sorry for making assumption. A possible scenario is: the root user executed the mon-get-instance-stats.pl or mon-put-instance-data.pl scripts initially, and the scripts has generated the file/folder on place, then the root user switched back to different user and execute the CloudWatch scripts again, this error shows up. To fix this, you need to remove the folder /var/tmp/aws-mon/, and re-execute the CloudWatch scripts to re-generate the folder and files again.
This is the support answer that I get from the aws support on having the same issue may be it will help u too. Also do check your AWSAccessKey for the EC2 instance as well.
QUESTION
I managed to follow all the steps listed here to setup the aws scripts to pick up the memory usage in the system and report it to cloudwatch. The problem i'm having is that it is not getting picked up in the Cloudwatch console.
When I do
...ANSWER
Answered 2017-Jan-19 at 03:19Cron doesn't use the login shell's environment variables, so ~
might not resolve to your current user's HOME
directory as it would in your manual tests. Try replacing this with the absolute path (e.g., /home/sarul/aws-script-mon/mon-put-instance-data.pl
and see if it runs the script correctly.
If you're using local AWS credentials in the user's environment or ~/.aws/config
rather than an instance profile, you might need to add these credentials somewhere accessible by cron as well.
Also note that the postfix
syslog entries indicate that a mail message of some sort is being queued - perhaps related to an error reported by the script invoked by cron.
QUESTION
I am trying to set up a standardized workflow for python development for data science. I came across, the popular, Anaconda distribution. But I could not find good documentation on how to setup the workspace.
I created an environment.yml
file with the following contents in /workspace/aws-scripts
ANSWER
Answered 2017-Jan-01 at 21:34Conda environments are used to have isolated setup in terms of Python version and installed libraries. There are not the place to put your own source code. So keep them in the default location ~/anaconda3/envs
and do not version control this third party code. Put our own code in the directory /workspace/aws-scripts
and use version control there. You can always re-create a conda environment by exporting all settings as a yaml file and using this file to create a new conda environment somewhere else.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install aws-scripts
You can use aws-scripts like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page