AWS Tweet-Sized Lessons (@AwsTricks) profile picture

Simple tips and tricks to make your cloud-life a bit easier. Not affiliated with #AWS. All mistakes made here are @RafalWilinski’s fault.

Cloud
Joined January 2020
Photo by AWS Tweet-Sized Lessons (@AwsTricks)Photo by AWS Tweet-Sized Lessons (@AwsTricks)Photo by AWS Tweet-Sized Lessons (@AwsTricks)Photo by AWS Tweet-Sized Lessons (@AwsTricks)Photo by AWS Tweet-Sized Lessons (@AwsTricks)Photo by AWS Tweet-Sized Lessons (@AwsTricks)Photo by AWS Tweet-Sized Lessons (@AwsTricks)Photo by AWS Tweet-Sized Lessons (@AwsTricks)Photo by AWS Tweet-Sized Lessons (@AwsTricks)Photo by AWS Tweet-Sized Lessons (@AwsTricks)
Don't know which EBS Volume type is suitable for you? 🔥 io1 - High throughput SSD, low latency, best for DBs 🚛 st1 - HDD; big data, warehouses, logs storage, streaming 🥶 sc1 - cheapest, slowest, data accessed infrequently 🚗 gp2 - most workloads, boot volumes, everything else
1
14
Onboarding to DynamoDB just got a bit easier.
Lack of SQL support was holding you back from trying @dynamodb? Good news! Now you PartiQL, an SQL-like language to query and manipulate DynamoDB data! 🚀 Dynobase supports this too! Download our latest alpha release and tell us what do you think. github.com/Dynobase/dynobase…
1
Lambda@Edge limits are different depending on the event type. For origin req/res is pretty much the same as regular #Lambda. For Viewer req/res it's much more restrictive: - Memory: 128MB - Timeout: 5s - Size of resp: 40KB - Compr. size of code: 1MB #serverless
6
7
When I'm not tweeting, I'm mostly building stuff like this 👷‍♂️
🚀 Finally managed to deploy Lambda@Edge-based #serverless GraphQL "server" with globally replicated DynamoDB table. Infra under 100 lines of code thanks to CDK! Edge Lambdas are routing to the closest available DDB replica with fallback to us-east-1. github.com/RafalWilinski/edg…
1
8
🔑If you need simple yet secure configuration management, use #AWS SSM Parameter Store If you need some data inside Parameters Store to be even more secure, use `SecureString` datatype If that's not enough, use Secrets Manager. Includes Cross-Account access and Secrets rotation
2
9
If you know your workload won't change you can save up to 80% just by reserving EC2 machines in advance. Purchase one-year or three-year term #AWS Reserved EC2 Instances directly in the AWS console. You can pay all upfront, partially or just on a monthly basis.
⛏ You can use Instance user data to convert your dumb EC2 instances into fully working #Minecraft servers right on start! Just paste this: ``` #!/bin/bash sudo yum install wget java -y wget <MINECRAFT-SERVER-JAR-URL> -O mc.jar java -Xmx1024M -Xms1024M -jar mc.jar nogui ```
5
#AWS CloudFormation has a hard limit of 200 resources. You can bypass that by: - Using Nested Stacks - Splitting your big stack into many smaller stack with cross references - Using #Terraform 🙃
7
Your weekly dose of #DynamoDB news is here.
[This Week in #DynamoDB] Issue #11 is here: dynobase.dev/newsletter/ DynamoDB Table Schema Designer, DDB for RDMS fans, using API gateway to run DDB queries and a whole lot more. Featuring @byrrorenato @rcronin1 @Falydoor @richardfan1126 @adamwathan @alexbdebrie @goserverless
⛵️ I know that feeling of opening #AWS console and being completely overwhelmed by the amount of options available. If you need just a simple VPS, use AWS Lightsail It's much simpler and user-friendly yet powerful and and plays well with the rest of AWS ecosystem.
1
4
🕵️‍ If you're running mission critical #AWS RDS database, make sure that: - It is setup in Multi-AZ mode - Is provisioned in private subnet; not publicly accessible - Has enhanced monitoring enabled - Has deletion protection enabled - Has encrypted storage - MORE BACKUPS!
5
17
📬 Did you know that instead of uploading assets to a server and then #S3, you can upload them directly to the bucket from the client without security risk? Generate pre-signed URLs and return them to user. They grant temporary read/write access to the requested resource
1
1
17
💎 When working with #javascript/#typescript + #AWS, end each call with`.promise();` This will make SDK to return a Promise which you can chain or `await` on, and you'll avoid "callback hell". This will make your code much more elegant
1
8
🏷 Remember to always Tag your resources! They are perfect way for describing metadata such as Version, Owner, Subproject, Compliance or which business unit should pay for them! Moreover they enable improved Automation, Cost Allocation and Access Control
1
10
🛳 If #Kubernetes is too hard for you (like me) and somehow #serverless doesn't fit into your requirements, you can still use ECS. It's cloud-native container scheduler that does almost the same as #k8s but it's just less YAML.
1
6
10
👮‍♀️ One of the fundamental principles of #IAM security is the "Principle of Least privilege". What does it mean? To give the very minimal and only the necessary amount of permissions to the service/machine/api/user/role to perform its task.
3
#serverless cron in 3 steps: 1. Create #AWS Lambda function and put your code there 2. Create CloudWatch Event with rule `rate(x minutes)` 3. Select Event target - Lambda from step 1 💥
🖼 Rekognition is fully managed AI service for images offered by @awscloud. Without knowledge of #AI, Python, maths and neural networks you can integrate image moderation, OCR, labelling or even video analysis within minutes, not weeks.
2
🧙‍♂️ To minimize downtime when upgrading AWS RDS #MySQL do this: 1. Create read replica of your main DB 2. Upgrade read replica DB version and let it catch up with the source 3. Disconnect app from the main DB and promote read replica to standalone 4. Reconnect to promoted DB
2
11
Lost SSH key and unable to connect to your EC2 instance? 🤷‍♀️ If you're using Amazon Linux AMI and already have SSM agent installed on it, use AWSSupport-ResetAccess document from Systems Manager Automation console to reset it and regain the access!
6