aws iam tag user
Here’s how to add tags to an existing user. aws iam tag-user \ --user-name ulysses \ --tags "Key"="dept","Value"="it" "Key"="role","Value"="admin" Tags with identical keys are overwritten. New keys are added.
Here’s how to add tags to an existing user. aws iam tag-user \ --user-name ulysses \ --tags "Key"="dept","Value"="it" "Key"="role","Value"="admin" Tags with identical keys are overwritten. New keys are added.
To get status of a file. lock status -f "/vol/folder/path/filename.doc" -p cifs To unlock a file. lock break -f "/vol/folder/path/filename.doc" -p cifs
I ran into an issue with Google Compute Engine TCP internal load balancer. The targets are unhealthy although all configs were correct installed. At one time the targets were working, but somehow they became unhealthy. In the end, 3 things needed to be checked. Make sure GCP’s guest environment is installed. Add the internal load balancer VIP address to the network properties. Add route via cmd. “route ADD VIP MASK 255.255.255.255” You will need to change the server’s IP from DHCP to static to add ILB VIP.
Here’s how to list all the access keys in AWS via Python. import logging import boto3 from botocore.exceptions import ClientError # set aws profile session = boto3.Session(profile_name="default") # get list of users iam = session.client('iam') users = iam.list_users() # display results print("{0:
Here’s how to add a route in Windows. Open CMD as Administrator. route add 10.10.10.10 mask 255.255.255.0 10.10.10.254 To make it persistent, add -p. route add 10.10.10.10 mask 255.255.255.0 10.10.10.254 To display. Specifies IP 4 only. route print -4
To check VM stats, use the following commands. To see used and unused memory, swap space. free To see RAM details. sudo dmidecode -t 17 To see number of processors. nproc To see CPU details. lscpu
Here’s a couple of steps to move a Docker image to the Google Container Registry. Create a container image. docker build -t gcr.io/${PROJECT_ID}/my-app:v1 . Push image to GCR. docker push gcr.io/[PROJECT-ID]/[IMAGE]
When Google acquired Feedburner a few years ago, we thought it would make Feedburner a better product. The opposite has happened. Google has basically shelved the Feedburner product. There hasn’t been any updates to Feedburner the last 5 years. If you’ve recently updated your site from http to https, you may have noticed that https feeds are not supported. It looks like Google doesn’t plan on updating Feedburner anytime soon. If you want to replace Feedburner, take a look at couple of options. Try FeedBlitz or perhaps even Mailchimp. ...
If you are using AWS CloudFront, you can avoid costly invalidations by using object versioning. Due to the nature of CloudFront, overwriting to the same file will not have any effect until caching is invalidated. The default timeout for CloudFront is 24 hours. If you have a website and you’ve overwritten your logo image, the updated image file will not be reflected on your site due to the caching timeout is 24 hours. To avoid invalidation, enable object versioning by adding a policy when overwriting files. ...
Boto is the Amazon Web Services (AWS) SDK for Python. It enables Python developers to create, configure, and manage AWS services, such as EC2 and S3. Boto provides an easy to use, object-oriented API, as well as low-level access to AWS services. Here’s a quick example how to query for AWS resources. import logging import boto3 from botocore.exceptions import ClientError # set aws profile session = boto3.Session(profile_name="default") # get buckets s3 = session.client('s3') results = s3.list_buckets() # display buckets print('Existing buckets:') for key in results['Buckets']: print(f'{key["Name"]}') # get ec2 instances. set region. ec2 = session.client('ec2', region_name='us-east-1') results = ec2.describe_instances() # display instances for key in results["Reservations"]: for instance in key["Instances"]: instance_id = instance["InstanceId"] instance_type = instance["InstanceType"] availability_zone = instance["Placement"]["AvailabilityZone"] print(instance_id + "\t" + instance_type + "\t" + availability_zone) # get list of users client = session.client('iam') results = client.list_users() # display list of users for key in results['Users']: print (key['UserName'])