Thursday, June 17, 2021

apt update

apt update    &&   apt list --upgradable

apt update actually updates list of Updates available for installed software

It fetches list of updates available

AWS Cognito, POLICY Generator, Policy Simulator, IAM Policy Visual Editor

 AWS Identities :

1) Users

2) Usergroups

3) Roles

4) Temporary security credentials


https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html

https://wellarchitectedlabs.com/reliability/300_labs/300_testing_for_resiliency_of_ec2_rds_and_s3/documentation/aws_credentials/



API Gateway 

https://www.youtube.com/watch?v=0dVL70Ayq5I


https://docs.aws.amazon.com/apigateway/latest/developerguide/getting-started.html   API Gateway + Lambda

https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getfederationtoken


IAM > Identity providers >  Create Identity Provider

OpenId()   vs SAML (ADFS Active Directory Federation Service)



Role can be assigned to

AWS service

EC2, Lambda and others


Another AWS account

Belonging to you or 3rd party


Web identity

Cognito or any OpenID provider


SAML 2.0 federation

Your corporate directory


Choose an API type

HTTP API

Build low-latency and cost-effective REST APIs with built-in features such as OIDC and OAuth2, and native CORS support.

Works with the following:

Lambda, HTTP backends


WebSocket API

Build a WebSocket API using persistent connections for real-time use cases such as chat applications or dashboards.



Roles and users are both AWS identities with permissions policies.

Roles can be used by the following:

An IAM user in the same AWS account as the role

A web service offered by AWS such as Amazon Elastic Compute Cloud (Amazon EC2)

An external user authenticated by an external identity provider (IdP) service that is compatible with SAML 2.0 or OpenID Connect.

Applications running on that instance can retrieve temporary security credentials and perform actions that the role allows


 https://sts.amazonaws.com

You can use AWS Security Token Service (AWS STS) to create and provide trusted users with temporary security credentials that can control access to your AWS resources. For more information about AWS STS, see Temporary security credentials in IAM. AWS STS is a global service that has a default endpoint at https://sts.amazonaws.com



EC2 is a Service

Load balancers (EC2 feature)


https://awspolicygen.s3.amazonaws.com/policygen.html

https://policysim.aws.amazon.com/home/index.jsp?#

https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_billing.html?icmpid=docs_iam_console#tutorial-billing-step2


IAM -> Policies -> Visual Editor

https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_billing.html?icmpid=docs_iam_console#tutorial-billing-step2


IAM > Identity providers > Create Identity Provider

https://console.aws.amazon.com/iamv2/home?#/identity_providers



Route 53 > Hosted zones > Domain.com > Record Type A /CNAME etc


Identity Pool  + Role ????????????


AWS Cognito (User Pool)  ? ??? How to get Token using postman????????


API Gateway + Cognito ?????????????


API Gateway + AWS Cognito ??????????? + EKS


 Elastic Container Registry  - Docker Image Repo


URLS - AWS CLI - How to use, How to List Buckets, Mount EBS Volume, Not Attach, AMI Launch Templates, Resize EBS Volume

http://localhost/tutorial/our-application/

https://hub.docker.com/_/node

https://unix.stackexchange.com/questions/464484/install-self-signed-certificate-to-alpine-linux

https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html

https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-role.html

https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/removing-sensitive-data-from-a-repository

https://stackoverflow.com/questions/38774798/accessdenied-for-listobjects-for-s3-bucket-when-permissions-are-s3

https://askubuntu.com/questions/53553/how-do-i-retrieve-the-public-key-from-a-ssh-private-key

https://docs.aws.amazon.com/cli/latest/reference/iam/list-users.html

https://stackoverflow.com/questions/1465076/how-to-access-ping-a-server-located-on-aws

https://stackoverflow.com/questions/19042025/amazon-ec2-free-tier-how-many-instances-can-i-run

https://www.elifulkerson.com/projects/tcping.php

https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all&all-free-tier.q=ebs&all-free-tier.q_operator=AND

https://serverfault.com/questions/706560/assign-public-ip-not-elastic-ip-after-instance-launched

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/launch-more-like-this.html

https://console.aws.amazon.com/ec2/v2/home?region=us-east-1#Instances:

https://devopscube.com/mount-ebs-volume-ec2-instance/

https://www.blogger.com/u/1/blog/posts/2528866210673694202?pli=1&q=lsblk

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-using-volumes.html

https://devopscube.com/mount-ebs-volume-ec2-instance/

https://www.quora.com/Can-you-create-an-AMI-of-your-EC2-as-part-of-free-tier-If-not-whats-the-charge

http://www.thecloudavenue.com/2020/04/aws-ami-vs-launch-templates.html

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-resize.html#resize-ebs-backed-instance

https://console.aws.amazon.com/ec2/v2/home?region=us-east-1#InstanceDetails:instanceId=i-0622cebe406df06cd

 

~/.aws ~.aws/confg ~./aws/credentials IAM Access Key/Secret Key

 aws configure

aws configure --profile karan

aws s3 ls 

aws s3 ls profile --fubar


vi ~/.aws/config

vi ~/.aws/credentials


aws iam list-users --profile default


[ec2-user@ip-172-31-16-83 .aws]$ aws iam list-users

An error occurred (AccessDenied) when calling the ListUsers operation: User: arn:aws:sts::061116847625:assumed-role/S3FullAccessFromEC2NoCredReq/i-0622cebe406df06cd is not authorized to perform: iam:ListUsers on resource: arn:aws:iam::061116847625:user/

Mount EBS to EC2

https://devopscube.com/mount-ebs-volume-ec2-instance/

sudo cp /etc/fstab /etc/fstab.bak

/dev/xvdf       /hdd2   ext4    defaults,nofail        0       0

* chown, chmod, chgrp, chattr, id 2775 vs 775

 

EBS vs EFS - AWS - Elastic Block Storage vs Elastic File System

https://aws.amazon.com/getting-started/tutorials/create-network-file-system/

https://www.missioncloud.com/blog/resource-amazon-ebs-vs-efs-vs-s3-picking-the-best-aws-storage-option-for-your-business


EBS  --------> 1 EC2 Instance is mapped to EBS - Block Level Storage


EFS ----------> Multiple EC2 Instances - Mounted to this File System - Common across multiple Apps


The main differences between EBS and EFS is that EBS is only accessible from a single EC2 instance in your particular AWS region, while EFS allows you to mount the file system across multiple regions and instances.


S3 -->  S3 is Object Level storage. S3 is not limited to EC2, Its linked to CloudFront through which many Media etc are hosted there.


Azure - Pipeline - Add Approver for Stage

https://learn.microsoft.com/en-us/azure/devops/pipelines/process/approvals?view=azure-devops&tabs=check-pass