This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#list projects | |
gcloud projects list | |
#list VMs | |
gcloud --project [project-id] compute instances list | |
#List Cloud Run services | |
gcloud --project [project-id] run services list | |
#Lookup GCP secret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#show response headers | |
curl -I some-url | |
#with basic auth | |
curl -u 'userid:password' some-url |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git reset HEAD~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws cloudformation describe-stack-resources --physical-resource-id example-s3-bucketname |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Heading 1 | |
## Heading 2 | |
### Heading 3 | |
# Tables | |
| a | b | | |
|---|---| | |
|aaa|bbb| | |
# Lists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Resources: | |
roleResourceName: | |
Type: AWS::IAM::Role | |
Properties: | |
RoleName: role-name | |
AssumeRolePolicyDocument: | |
Version: '2012-10-17' | |
Statement: | |
- Effect: Allow | |
Principal: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you call lambda.invokeAsync() from one lambda calling another, if the calling lambda completes/exits before the second | |
lambda has been successfully invoked then depending on the timing it's possible the second Lambda will not invoke sucessfully. | |
The SDK docs show calling invokeAsync with a callback: | |
const params = { | |
"FunctionName": "fucntion-name-to-invoke", | |
"InvokeArgs": JSON.stringify(payload-to-pass-to-lambda) | |
}; | |
lambda.invokeAsync(params, function (error, result) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fields @timestamp, @message | |
| filter @message like /string pattern to match/ | |
| sort @timestamp asc | |
fields @timestamp | |
| filter @message like /string pattern to match/ | |
#parse line, match a pattern, capture pattern match in this case * as named value userId | |
| parse "\"userId\": \"*\"" as userId | |
#only include where this has a value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#list-functions is paginated by default so need to set page-size, no-paginate or simiilar to get complete list | |
# see https://docs.aws.amazon.com/cli/latest/reference/lambda/list-functions.html | |
# https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-pagination.html | |
aws lambda list-functions --region us-west-2 | |
--query 'Functions[?starts_with(FunctionName, `name-pattern-here`) == `true`].FunctionName' | |
--page-size 300 >> output.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Calling an api that doesn't exist in your API Gateway will return a 403 with the rather misleading response: | |
{ | |
"message": "Missing Authentication Token" | |
} |
NewerOlder