GithubHelp home page GithubHelp logo

acloudguru-resources / course-aws-certified-developer-associate Goto Github PK

View Code? Open in Web Editor NEW
191.0 12.0 561.0 10.08 MB

AWS Certified Developer Associate course

HTML 44.03% Python 14.59% Shell 32.21% JavaScript 9.16%

course-aws-certified-developer-associate's Issues

Typo that makes Expirement Fail

@fayecloudguru During the cloud guru DVA-C01 session, the scripts attched with one bug found, makes the experiment fails:

in the Cognito_Commands.txt file: step 5, the highlight part below is considered as typo, need to remove to keep consistency of the Role name with rest of the guide.

--roles unauthenticated=arn:aws:iam::xxxxx:role/Cognito_DynamoPoolUnauthRole --output json

More backgroud:

Cognito Commands:

  1. Using the CLI, create new identity pool, named DynamoPool, allow unauthenticated entities.
    **** (use ^ - Shift + 6 if you are a windows user, not ) ****

    aws cognito-identity create-identity-pool
    --identity-pool-name DynamoPool
    --allow-unauthenticated-identities
    --output json

  2. Create an IAM role named Cognito_DynamoPoolUnauth.

aws iam create-role --role-name Cognito_DynamoPoolUnauth --assume-role-policy-document file://myCognitoPolicy.json --output json

  1. Grant the Cognito_DynamoPoolUnauth role read access to DynamoDB by attaching a managed policy (AmazonDynamoDBReadOnlyAccess).

aws iam attach-role-policy --policy-arn arn:aws:iam::aws:policy/AmazonDynamoDBReadOnlyAccess --role-name Cognito_DynamoPoolUnauth

  1. Get the IAM role Amazon Resource Name (ARN).
    aws iam get-role --role-name Cognito_DynamoPoolUnauth --output json

  2. Add our role to the Cognito Identity Pool. Replace the pool ID with your own pool ID and use the role ARN from the previous step.

aws cognito-identity set-identity-pool-roles
--identity-pool-id "us-east-1:xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
--roles unauthenticated=arn:aws:iam::xxxxx:role/Cognito_DynamoPoolUnauthRole --output json

  1. Double check it worked using:

aws cognito-identity get-identity-pool-roles --identity-pool-id "us-east-1:xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

  1. We can now specify the Cognito credentials in our application - i.e. in the JavaScript section of our webpage!
    Replace the identity pool ID with your own and the role ARN with your own role ARN.
    We are going to add this snippet to our index.html:

AWS.config.credentials = new AWS.CognitoIdentityCredentials({
IdentityPoolId: "us-east-1:xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
RoleArn: "arn:aws:iam::xxxxx:role/Cognito_DynamoPoolUnauthRole"
});

Add comment of which runtime is expected

During Lab "Creating a Lambda Function Using the AWS Console", it is expected to create a Lambda function using the code creating-a-lambda-function-using-the-aws-console/index.js.

Currently Lambda defaults to Node.js 20.x, however the code supplied is for Node.js 16.x. I propose that a one line comment is added to the top of the code to state that it requires the Node 16.x runtime.

creating a dynamodb table demo

After typing this i
[ec2-user@ip-172-31-82-70 Create_A_DynamoDB_Table_Demo]$ aws dynamodb batch-write-item --request-items file://items.json
i got this error
An error occurred (ResourceNotFoundException) when calling the BatchWriteItem operation: Requested resource not found. when trying to create a table.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.