NoSuchKey. S3 Error Message: The specified key does not exist

Viewed 36

I am new to aws s3. What is "s3 key". In my target directory I have:

lambda-handler-with-pojos-0.0.1-SNAPSHOT.jar

An error occurred (InvalidParameterValueException) when calling the CreateFunction operation: Error occurred while GetObject. S3 Error Code: NoSuchKey. S3 Error Message: The specified key does not exist.

        aws lambda create-function \
        --function-name demo-lambda-with-cli2 \
        --runtime java8 \
        --role arn:aws:iam::xxx:role/lambda_iam_role_test \
        --handler tech.heartin.books.serverlesscookbook.MyLambdaHandler::handleRequest \
        --code S3Bucket=jadeite1971,S3Key=lambda-handler-with-pojos-0.0.1-SNAPSHOT.jar \
        --timeout 15 \
        --memory-size 512 \
        --region us-east-2 \
        --profile admin

An error occurred (InvalidParameterValueException) when calling the CreateFunction operation: Error occurred while GetObject. S3 Error Code: NoSuchKey. S3 Error Message: The specified key does not exist.

Albert Lam@DESKTOP-IJR725V MINGW64 /c/book/AWS-LAMBDA-VERSION1/Serverless Programming Cookbook-R6/Albert/OriginalServerless/Chapter01/your-first-lambda-with-aws-cli/lambda-handler-with-pojos/target
$ ls
buildtools/           checkstyle-checker.xml  checkstyle-suppressions.xml  dependency-maven-plugin-markers/  lambda-handler-with-pojos-0.0.1-SNAPSHOT.jar  maven-status/
checkstyle-cachefile  checkstyle-result.xml   classes/                     generated-sources/                maven-archiver/                               original-lambda-handler-with-pojos-0.0.1-SNAPSHOT.jar
0 Answers
Related