- Log into your AWS account and navigate to EC2
- View Instance Details looking for the Root Device and Block Devices to identify the volume you want to resize
- Click the storage Device and select the EBS ID
- While in the Volumes panel click Actions at the top of the page
- Select Modify Volume to modify that particular volume
- Enter the desired volume size in GBs and click modify, yes to confirm
- SSH into your Instance
- Run
lsblkto list available blocks (volumes) and note the volume size / names - Run
sudo growpart /dev/volumename 1on the volume you want to resize, in our case it wassudo growpart /dev/xvda 1
๐
This file contains hidden or 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
| https://futuramaapi.herokuapp.com/ | |
| https://thesimpsonsquoteapi.glitch.me/ | |
| https://api.chucknorris.io/ | |
| https://rickandmortyapi.com/ | |
| https://catfact.ninja/ |
This file contains hidden or 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
| #!/bin/bash | |
| ECR_REGION='us-east-1' | |
| ECR_REPO='YOUR_REPO_GO_HERE' | |
| IMAGES_TO_DELETE=$( aws ecr list-images --region $ECR_REGION --repository-name $ECR_REPO --filter "tagStatus=UNTAGGED" --query 'imageIds[*]' --output json ) | |
| if [ "$IMAGES_TO_DELETE" == [] ] | |
| then |
This file contains hidden or 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
| const puppeteer = require('puppeteer'); | |
| (async () => { | |
| let proxies = [ | |
| '', | |
| '159.89.191.89:8080' | |
| ]; | |
| let urls = [ | |
| '', |
This file contains hidden or 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
| pymysql |
This file contains hidden or 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
| ERROR_HELP_STRINGS = { | |
| # Common Errors | |
| 'InternalServerError': 'Internal Server Error, generally safe to retry with exponential back-off', | |
| 'ProvisionedThroughputExceededException': 'Request rate is too high. If you\'re using a custom retry strategy make sure to retry with exponential back-off.' + | |
| 'Otherwise consider reducing frequency of requests or increasing provisioned capacity for your table or secondary index', | |
| 'ResourceNotFoundException': 'One of the tables was not found, verify table exists before retrying', | |
| 'ServiceUnavailable': 'Had trouble reaching DynamoDB. generally safe to retry with exponential back-off', | |
| 'ThrottlingException': 'Request denied due to throttling, generally safe to retry with exponential back-off', | |
| 'UnrecognizedClientException': 'The request signature is incorrect most likely due to an invalid AWS access key ID or secret key, fix before retrying', | |
| 'ValidationException': 'The input fails to satisfy the con |
This file contains hidden or 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
| deploy: | |
| @cdk deploy --require-approval never | |
| install: | |
| @npm install | |
| install_production: | |
| @npm install --only=prod | |
| watch: |
This file contains hidden or 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
| class Secrets { | |
| constructor(awsClient) { | |
| this.client = awsClient; | |
| } | |
| async getSecret(SecretId){ | |
| return new Promise((resolve) => { | |
| this.client.getSecretValue({ SecretId }, (secretManagerError, data) => { | |
| if (secretManagerError) { | |
| if (secretManagerError.code === "DecryptionFailureException") |
This file contains hidden or 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
| for D in *; do | |
| if [ -d "${D}" ]; then | |
| echo "Processing -> ${D}" | |
| cd "${D}" && YOU_SPECIAL_COMMAND_GO_HERE && cd - | |
| echo "----------------------------"; | |
| fi | |
| done |
This file contains hidden or 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
| let response; | |
| exports.lambdaHandler = async (event, context) => { | |
| try { | |
| const ret = await axios(url); | |
| response = { | |
| 'statusCode': 200, | |
| 'body': JSON.stringify({ | |
| location: ret.data.trim() | |
| }) |