Posts

Business case: Create the alert message to Slack with MS Flow/Automate

Image
 Business case: Automatically post the alert message when it hits the criteria by using the store procedure in MS SQL Azure Solution: Assumption that we already had the data as following by writing it in the store procedure.

Business case: Monitor mailbox and auto-save the attachment to a SharePoint

Image
Business Case: - Monitors a shared mailbox for messages that contain the words "expense report" - Saves the attachment to a SharePoint Library called ExpenseReports - Marks the email as Read - Marks the email as Complete  Solution: Enter a value for Flow name, and then search the triggers for When a new email arrives in a shared mailbox (V2): Select SharePoint site Mark as read Flag email Result:

Business case: Holiday Request

Image
  Business case: Create one Holiday request by using Microsoft Forms, Team, Power Automate (Flow), Exchange Resolve: - Create one form - Add link to Teams - Create the flow + Select "When a new response is submitted" + Next step, get response details + Next, Get manager + Next, Send an approval + Next, Apply the condition Done!.... Test result:

Build API Gateway, Lambda, and Cognito

  Command line login: aws cognito-idp admin-initiate-auth --user-pool-id us-west-2_leb660O8L --client-id 1uk3tddpmp6olkpgo32q5sd665 --auth-flow ADMIN_NO_SRP_AUTH --auth-parameters USERNAME=myusername,PASSWORD=mypassword Direct curl here curl -X POST --data @user-data.json \ -H 'X-Amz-Target: AWSCognitoIdentityProviderService.InitiateAuth' \ -H 'Content-Type: application/x-amz-json-1.1' \ https://cognito-idp.<just-replace-region>.amazonaws.com/ file json  user-data.json {"AuthParameters" : {"USERNAME" : "sadfsf", "PASSWORD" : "password"}, "AuthFlow" : "USER_PASSWORD_AUTH", "ClientId" : "csdfhripnv7sq027kktf75"} References: https://www.youtube.com/watch?v=9BWezRlOjmA How to secure Microservices on AWS with Cognito, API Gateway, and Lambda (freecodecamp.org) auth-api-demo/aws-setup.md at master · csepulv/auth-api-demo (github.com) Building fine-grained authorization using Amazon...

Hands on with automated CI/CD pipeline - AWS

Image
  This post is extended from AWS blog. And apply it to my own project. Automated CI/CD pipeline for .NET Core Lambda functions using AWS extensions for dotnet CLI | AWS DevOps Blog (amazon.com) Creating a CodeCommit repository Lesson learnt  Issue with Credential bwt AWS accounts codeCommit. Go to here in order to reset. If this problem comes on a Windows machine, do the following. Go to Credential Manager Finally, I have finished to build a project and deploy it to lambda.

Upload object to s3 using aws api gateway service proxy / API Gateway Proxy for S3 with subdirectories

Image
  This is guideline how to create the AWS API Gateway Assumption: S3 bucket name: "us-east-1-dev" and folders: --> light/ --> test_1/ --> pdfs/ Create the REST API Created a resource proxy select service proxy  Resource Name*: proxy Resource Path*: {proxy+} Click Create API select the option: HTTP proxy Endpoint URL: (key anything) e.g:  https://testing.com/{proxy} click Save Next, choose "Integration Request"  Integration type: AWS service select the desired region select the desired aws service(s3 in my case) In subdomain give bucket name (e.g: xxxx- us-east-1-dev) HTTP method: select "PUT" if you want to upload a object. "GET" if you want to get the object. Here is "PUT" In path override give Path override: {proxy} (because to pass the bucketname dynamically) finally for api gateway service proxy we need to add the arn for detail explanation on creation of arn follow the document  http://docs.aws.amazon.com/apigateway/latest...

AWS API gateway, S3

Image
  Tutorial: Create a REST API as an Amazon S3 proxy in API Gateway - Amazon API Gateway Using REST API to upload files to the S3 bucket - BlueGrid : BlueGrid AIM role Edit Trust Relationship {   "Version": "2012-10-17",   "Statement": [     {       "Effect": "Allow",       "Principal": {         "Service": "s3.amazonaws.com"       },       "Action": "sts:AssumeRole"     },     {       "Effect": "Allow",       "Principal": {         "Service": "apigateway.amazonaws.com"       },       "Action": "sts:AssumeRole"     }   ] } Next, go to API Gateway --> create a REST API. Create the folder & item resource create GET -->  with "tanldttestingapigateway" is a S3 bucket name. /{folder}/{item} - GET - Method Execution --> to add URL path parameters Create the fo...