I hereby claim:
- I am abhigets on github.
- I am abhijeetpatil (https://keybase.io/abhijeetpatil) on keybase.
- I have a public key ASADUlV1HZDPoNVm51kDdzp2PnQn0YvLqm04pII3z2gylwo
To claim this, I am signing this object:
#!/bin/bash | |
#get the policy from aws and store it in variable | |
BUCKET_NAME="your bucket name" | |
S3_OLD_POLICY=$(aws s3api get-bucket-policy --bucket ${BUCKET_NAME} --query Policy --output text) | |
echo $S3_OLD_POLICY | |
echo "---------------" | |
#get the ip of my host | |
MY_IP=$(curl ipecho.net/plain;) | |
echo $MY_IP |
#!/bin/bash | |
#install jq as pre-requisite | |
#installation guide https://stedolan.github.io/jq/download/ | |
#brew install jq | |
apk add jq | |
#get the policy from aws and store it in variable | |
QUERY='items[?name==`your api gateway name`]' | |
GATEWAY_ID=$(aws apigateway get-rest-apis --query ${QUERY} | jq -r '.[0].id') | |
OLD_POLICY=$(aws apigateway get-rest-api --rest-api-id ${GATEWAY_ID}) | |
OLD_POLICY=$(jq -n "$OLD_POLICY" | jq '.policy') |
I hereby claim:
To claim this, I am signing this object: