1626339570
This tutorial aims to teach you in the most simple way possible Amazon EC2, which is the one of the most used AWS Services.
We are going to create a simple webserver, see how to correctly add roles to the machine so that can perform operations for us in the cloud. Then we move to more advanced topics: we will create EBS volumes, create and use an AMI and finally we will use the EBS.
If you follow everything that I do in the tutorial, start to end, it will be covered by the Amazon Free Plan and you won’t spend a single cent.
Content:
Twitter: https://twitter.com/mostly_code
#aws #cloud
1598408880
The Basics
AWS KMS is a Key Management Service that let you create Cryptographic keys that you can use to encrypt and decrypt data and also other keys. You can read more about it here.
Important points about Keys
Please note that the customer master keys(CMK) generated can only be used to encrypt small amount of data like passwords, RSA key. You can use AWS KMS CMKs to generate, encrypt, and decrypt data keys. However, AWS KMS does not store, manage, or track your data keys, or perform cryptographic operations with data keys.
You must use and manage data keys outside of AWS KMS. KMS API uses AWS KMS CMK in the encryption operations and they cannot accept more than 4 KB (4096 bytes) of data. To encrypt application data, use the server-side encryption features of an AWS service, or a client-side encryption library, such as the AWS Encryption SDK or the Amazon S3 encryption client.
Scenario
We want to create signup and login forms for a website.
Passwords should be encrypted and stored in DynamoDB database.
What do we need?
Lets Implement it as Serverless Application Model (SAM)!
Lets first create the Key that we will use to encrypt and decrypt password.
KmsKey:
Type: AWS::KMS::Key
Properties:
Description: CMK for encrypting and decrypting
KeyPolicy:
Version: '2012-10-17'
Id: key-default-1
Statement:
- Sid: Enable IAM User Permissions
Effect: Allow
Principal:
AWS: !Sub arn:aws:iam::${AWS::AccountId}:root
Action: kms:*
Resource: '*'
- Sid: Allow administration of the key
Effect: Allow
Principal:
AWS: !Sub arn:aws:iam::${AWS::AccountId}:user/${KeyAdmin}
Action:
- kms:Create*
- kms:Describe*
- kms:Enable*
- kms:List*
- kms:Put*
- kms:Update*
- kms:Revoke*
- kms:Disable*
- kms:Get*
- kms:Delete*
- kms:ScheduleKeyDeletion
- kms:CancelKeyDeletion
Resource: '*'
- Sid: Allow use of the key
Effect: Allow
Principal:
AWS: !Sub arn:aws:iam::${AWS::AccountId}:user/${KeyUser}
Action:
- kms:DescribeKey
- kms:Encrypt
- kms:Decrypt
- kms:ReEncrypt*
- kms:GenerateDataKey
- kms:GenerateDataKeyWithoutPlaintext
Resource: '*'
The important thing in above snippet is the KeyPolicy. KMS requires a Key Administrator and Key User. As a best practice your Key Administrator and Key User should be 2 separate user in your Organisation. We are allowing all permissions to the root users.
So if your key Administrator leaves the organisation, the root user will be able to delete this key. As you can see **KeyAdmin **can manage the key but not use it and KeyUser can only use the key. ${KeyAdmin} and **${KeyUser} **are parameters in the SAM template.
You would be asked to provide values for these parameters during SAM Deploy.
#aws #serverless #aws-sam #aws-key-management-service #aws-certification #aws-api-gateway #tutorial-for-beginners #aws-blogs
1599097440
A famous general is thought to have said, “A good sketch is better than a long speech.” That advice may have come from the battlefield, but it’s applicable in lots of other areas — including data science. “Sketching” out our data by visualizing it using ggplot2 in R is more impactful than simply describing the trends we find.
This is why we visualize data. We visualize data because it’s easier to learn from something that we can see rather than read. And thankfully for data analysts and data scientists who use R, there’s a tidyverse package called ggplot2 that makes data visualization a snap!
In this blog post, we’ll learn how to take some data and produce a visualization using R. To work through it, it’s best if you already have an understanding of R programming syntax, but you don’t need to be an expert or have any prior experience working with ggplot2
#data science tutorials #beginner #ggplot2 #r #r tutorial #r tutorials #rstats #tutorial #tutorials
1603458624
Amazon EC2 is a service that allows you businesses to run their application in AWS cloud. You can easily set up a virtual machine and perform all your computation on it. In this post, we will teach you the basics of Amazon EC2.
EC2 is one of the oldest and fundamental services of AWS. Though everything today is serverless, you still need to know EC2. EC2 allows you to do the following things :
AMIs are the templates from which virtual servers (EC2 instance) get created.
In simple terms, AMIs are the collection of the operating system, architecture (32-bit or 64-bit) with the softwares that will be running on that operating system.
For example:
Amazon Linux AMI is the one that comes with a Linux operating system and many packages of the Linux that one might need.
Windows AMI comes with Windows as its operating system and software one might need.
By choosing AMI you basically decide the software part of your EC2 machine. You can use a single AMI and launch multiple instances from it.
#aws #aws-cloud #aws-iam #aws-certification #aws-top-story #ec2 #virtual-machine #amazon-web-services
1603780320
EC2 stands for, Elastic Compute Cloud. It is a part of Amazon’s cloud-computing platform, Which allows users to rent virtual computers on which they can run their own computer applications. Creating and using the EC2 instance is very simple. Following are the steps:
Step 1: Create an Account in EC2
1.1) Go to and the following screen will get a display.
1.2) Click on “Create an AWS Account”
1.3) Start filling the account creation form.
You will require your email Id, Phone Number, and Credit/Debit card details. AWS is free for 12 months, however, it is mandatory to fill in payment details to create an account.
1.4) After filling in all the required information, your account will get created. Within 24 hours all the services (like EC2) will get activated on your account. (but mostly it take 5-10 minutes)
#cloud #tutorial #amazon #ec2 #aws ec2
1596728880
In this tutorial we’ll learn how to begin programming with R using RStudio. We’ll install R, and RStudio RStudio, an extremely popular development environment for R. We’ll learn the key RStudio features in order to start programming in R on our own.
If you already know how to use RStudio and want to learn some tips, tricks, and shortcuts, check out this Dataquest blog post.
[tidyverse](https://www.dataquest.io/blog/tutorial-getting-started-with-r-and-rstudio/#tve-jump-173bb26184b)
Packages[tidyverse](https://www.dataquest.io/blog/tutorial-getting-started-with-r-and-rstudio/#tve-jump-173bb264c2b)
Packages into Memory#data science tutorials #beginner #r tutorial #r tutorials #rstats #tutorial #tutorials