jatinu03
jatinu03
Untitled
1 post
Don't wanna be here? Send us removal request.
jatinu03 · 1 year ago
Text
Code
sudo tcpdump -lnvX icmp
sudo ip link add vxlan0 type vxlan id 100 dev eth0 local 10.0.1.11 dstport 4789 (This creartes the VXLAN inteface and decapsulates VXLAN traffic using the VXLAN Id supplied in step 5.4)
sudo ip link set vxlan0 up (This ebavles the VXLAN interface vxlan0)
sudo tcpdump -lnvXi vxlan0 icmp _(This captures traffic on the vxlan0)
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Deny", "Action": [ "ec2:CreateTags", "ec2:DeleteTags" ], "Resource": "arn:aws:ec2:::volume/*", "Condition": { "StringNotEqualsIfExists": { "aws:RequestTag/jam_testing": ["yes", "no"] }, "Null": { "aws:RequestTag/jam_testing": "false" } } } ] }
import boto3 from botocore.exceptions import ClientError
def create_table(dynamodb=None): if not dynamodb: dynamodb = boto3.resource('dynamodb') table = dynamodb.create_table( TableName='awsjam_employee', KeySchema=[ { 'AttributeName': 'employee_id', 'KeyType': 'HASH' # Partition key } ], AttributeDefinitions=[ { 'AttributeName': 'employee_id', 'AttributeType': 'N' } ], ProvisionedThroughput={ 'ReadCapacityUnits': 10, 'WriteCapacityUnits': 10 } ) return table
create_table()
Above---- touch dynamodb.py
touch insertrecord.py Below----
import boto3
def insert_record(table_name,employee_id, name, age, salary, city): dynamodb = boto3.resource('dynamodb') table = dynamodb.Table('awsjam_employee') table.put_item( Item={ 'employee_id': employee_id, 'name': name, 'age': age, 'salary': salary, 'city': city } )
insert_record('awsjam_employee', 1, 'John', '30', '20000', 'New York') insert_record('awsjam_employee', 2, 'Peter', '25', '30000', 'New York') insert_record('awsjam_employee', 3, 'Mark', '35', '40000', 'New York') insert_record('awsjam_employee', 4, 'Mary', '40', '50000', 'New York') insert_record('awsjam_employee', 5, 'Jennifer', '19', '60000', 'New York')
import boto3 dynamodb = boto3.resource('dynamodb') table = dynamodb.Table('awsjam_employee') table.update_item( Key={ 'employee_id': 1 }, UpdateExpression='SET salary = :val1', ExpressionAttributeValues={ ':val1': 50000 } )
py import boto3 def delete_item(dynamodb=None): dynamodb = boto3.resource('dynamodb') table = dynamodb.Table('awsjam_employee') response = table.scan() for item in response['Items']: if(int(item['age']) <= 20): resp = table.delete_item(Key={'employee_id': int(item['employee_id'])}) response = table.scan() print(response)
invoke function
delete_item()
aws evidently start-launch --launch SpecialSale --project OriginalGoodsStore --region us-east-2
select B.* from "$REPLACEWITHDATASOURCENAME"."default"."autocustomer" B join "AwsDataCatalog"."vehicles"."$REPLACEWITHDATATABLENAMECREATEDBYCRAWLER" A ON cast(A.policyid as integer)=B.policyid where A.title_status = 'clean vehicle' and A.year = '2007' and A.state='california' and A.brand='chrysler'
aws kinesis list-shards --stream-name *KinesisStreamForJam aws kinesis split-shard --stream-name *KinesisStreamForJam* --shard-to-split shardId-000000000002 --new-starting-hash-key *320854911280625642308916404954512140970 aws kinesis update-shard-count --stream-name *KinesisStreamForJam* --target-shard-count *8* --scaling-type **UNIFORM_SCALING 180
1 note · View note