AWS - Udemy Purchased Course

 

HERE AWS ALL SOURCE CODE  


office laptop  - D:\Practice Projects\AWS

AWS Doc - 1


https://www.youtube.com/watch?v=9rlKByxBLaY&list=PLXCqSX1D2fd9rVux4a5y6krZQQOwMcWz2&index=4


https://www.youtube.com/watch?v=GZ8_anxgpK8&list=PLXCqSX1D2fd9rVux4a5y6krZQQOwMcWz2&index=2



S3

 

s3 - it is have like a bucket function  - here we can upload any kind of files from our code . like a gdrive







Install AWS CLi


https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-windows.html


CMD For AWS 


aws --version


CMD For AWS dot net Tool


dotnet tool install --global Amazon.Lambda.Tools 


CMD For AWS dot net Tool Update 


dotnet tool update --global Amazon.Lambda.Tools 


CMD Install Lamda Template 


dotnet new --install Amazon.Lambda.Templates::5.3.0



----------------------------------------------------------


From Udemy


Create IAM User - Development


Dev

Access key id  -  AKIAY3DGY3S7ATG7P74R

Secret key   - FybBJqjOw5X+eugG8EZkcidConxv32CAqASwTYKM


AWS  EMail Service


Grant Permission for aws iam user 


Following this one


https://www.youtube.com/watch?v=GZ8_anxgpK8&list=PLXCqSX1D2fd9rVux4a5y6krZQQOwMcWz2&index=2





Lambda Create Function 



dotnet new lambda.EmptyFunction --name LambdaDemo



  • Cloud Watch is the where all the log goes , you can create alarms , dashboard on aws cloud watch 

 


dotnet lambda deploy-function LambdaDemo


Error retrieving configuration for function LambdaDemo: No such host is known


AWS Access Key ID [None]: AKIAY3DGY3S7ATG7P74R

AWS Secret Access Key [None]: gXznjNRRjfRwHPXtUUTRVcx568uCcW0Ut1z4B7LI6vA=

Default region name [None]: us-east-2

Default output format [None]: json



dotnet tool install -g Amazon.Lambda.Tools

dotnet new --install Amazon.Lambda.Templates::5.3.0


dotnet new lambda.EmptyFunction  --name LambdaDemo


https://us-east-2.console.aws.amazon.com/lambda/home?region=us-east-2#/functions


Bookmark




Simple Mail Service - Udemy


This is practice project link - here you can send email to verified email address


https://drive.google.com/file/d/1FqVwLu1DdDP-WAzx1rNkDJlrpB6wtpji/view?usp=sharing








CloudWatch


https://drive.google.com/file/d/1aZEwMNphDxIxL8-cSzM4iJfAlA3KX8AA/view?usp=sharing




















Simple Notification Service 







PART - 1 - Function Upload Link Here


PART - 2 - Add message to Sns (Check msg in lambda-view logs in cloud watch)









UdemyLamdaSns

















SQS





Permissions for Sqs


IAM USER 


Book mark - D:\Practice Projects\AWS\SQSLambda

https://www.udemy.com/course/aws-for-net-core-developers/learn/lecture/23710698#overview


Create Queue





https://sqs.us-east-2.amazonaws.com/607953411262/UdemyTestQueue





Then Create API Project - UdemySqs


Nuget Packages


AWSSDK.Extensions.NetCore.Setup


Awssdk.sqs


Send Message to SQS Queue Url



        [HttpGet]

        public  async Task<ActionResult> SendMessageToQueue()

        {

            var sendMessageRequest = new SendMessageRequest

            {

                QueueUrl = "https://sqs.us-east-2.amazonaws.com/607953411262/UdemyTestQueue",

                MessageBody = $"Hi Vasanth - SQS Test at {DateTime.UtcNow.ToLongDateString()}"

            };

            SendMessageResponse sendMessageResponse = await _amazonSQS.SendMessageAsync(sendMessageRequest);


            return Ok();

        }



  • A lambda function is subscribed with this sqs queue url 

  • Check logs in that function 






Dynamo DB








Table Structure



IAM  User Permission 


AmazonDynamoDBFullAccess






Then click create 


  • Create item



Nuget Packs


AWSSDK.DynamoDBv2

AWSSDK.Extensions.NETCore


Upload projects in Gdrive 


continue @ 41. DynamoDB Controller



Methods 


  • Getallmessages

  • insertmessages









Dyanamo DB Source Code

Simple Storage Service (S3) 

https://www.udemy.com/course/aws-for-net-core-developers/learn/lecture/24117012#overview



Permissions


AmazonS3FullAccess


Create Bucket

Bucket Name -   S3-udemy-demo-96


Nuget Packs


Swashbuckle.AspNetCore


AWSSDK.Extensions.NETCore.setup


AWSSDK.S3


--------------


Note - presignedurl is contains url expiry time for the resource 


Once the url Expires then it returns like this


<Error>

<Code>AccessDenied</Code>

<Message>Request has expired</Message>

<X-Amz-Expires>30</X-Amz-Expires>

<Expires>2021-07-04T11:55:03Z</Expires>

<ServerTime>2021-07-04T11:56:00Z</ServerTime>

<RequestId>WDJ52PWMAH6VFZ05</RequestId>

<HostId>ilBrc8yUToME9cI968HozehO+zrxjzx9CR7MzAMju4g76f/X7S4L6Te5/S1cu6r9pgzrsc7IbkY=</HostId>

</Error>















Amazon SageMaker



Permission


AmazonSageMakerFullAccess


------




Amazon SageMaker


Amazon SageMaker - >  Notebook instances - > Create notebook instance


Name - UdemySageMakerInstance






Create an IAM role


Then click create 


Amazon SageMaker >Notebook instances -> UdemySageMakerInstance


Create Api Project 


Nuget Packages


AWSSDK.Extensions.NETCore.Setup



Convair was an american aircraft manufacturing company which later expanded into rockets and spacecraft


----------------------------------------------------------------------------------------


   "IIS Express": {

        "commandName": "IISExpress",

        "launchBrowser": true,

        "launchUrl": "api/sagemaker?text=Convair was an american aircraft manufacturing company which later expanded into rockets and spacecraft",    

        "environmentVariables": {

            "ASPNETCORE_ENVIRONMENT": "Development"

        }








Instinct Type - t3.nano   - 0.5 GB 













http://vasanth.ap-south-1.elasticbeanstalk.com/








Elastic Container Service




Permission - AdministratorAccess


Create Queue




https://sqs.us-east-2.amazonaws.com/607953411262/ECSQueue



Create Worker Service Project 


Install Docker for windows and restart System



It will fail at first time only 





Published


Open and check - Amazon Elastic Container Registry

Amazon Elastic Container Registry





For Testing 

Send a sqs message




Check the Cloud watch logs




URL For ECS 


https://drive.google.com/file/d/1GIWsonQ3VWOUW99ieIgH0i8IeoUwZuqK/view?usp=sharing


Comments

Popular Posts