Git Product home page Git Product logo

aws-sam-cli-app-templates's Introduction

AWS SAM CLI Application Templates

This repository contains the application templates used in the AWS SAM CLI for sam init calls.

Contributing

We welcome issue reports and pull requests to help improve these application templates.

Testing a template locally

You can create a buildable and deployable project folder from a local template using the below command. The <project_name> can be whatever you want your project to be called, and <path/to/init_template> should point to the existing folder that contains the template.

Command: sam init --no-input --location <path/to/init_template> --name <project_name>

For example: samdev init --no-input --location /home/myuser/code/aws-sam-cli-app-templates/dotnet8/hello-native-aot --name beauNativeAotTest

Testing updated sam init locally

To test an updated workflow of sam init, including changes to the prompts to create your new template, you need to push your changes from your fork so they can be downloaded by the SAM CLI. You'll also need a local copy of SAM CLI's source code to modify to point to your fork. Follow SAM CLI's main DEVELOPMENT_GUIDE.md to get a local version of SAM CLI setup. With your fork pushed, you can update the samcli/commands/init/init_templates.py file in your local SAM CLI like below. Make sure to update all three variables.

APP_TEMPLATES_REPO_COMMIT = <the commit hash>
MANIFEST_URL = (
    f"https://raw.githubusercontent.com/<your_github_id>/aws-sam-cli-app-templates/{APP_TEMPLATES_REPO_COMMIT}/manifest-v2.json"
)
APP_TEMPLATES_REPO_URL = "https://github.com/<your_github_id>/aws-sam-cli-app-templates"

Example

APP_TEMPLATES_REPO_COMMIT = "abcdefg1234567d6e78f319e189d39593c628b7f"
MANIFEST_URL = (
    f"https://raw.githubusercontent.com/aws/aws-sam-cli-app-templates/abcdefg1234567d6e78f319e189d39593c628b7f/manifest-v2.json"
)
APP_TEMPLATES_REPO_URL = "https://github.com/cool-developer-xyz/aws-sam-cli-app-templates"

License

This project is licensed under the Apache-2.0 License.

aws-sam-cli-app-templates's People

Contributors

aahung avatar awood45 avatar beau-gosse-dev avatar bmoffatt avatar bpauwels avatar coshus avatar dependabot[bot] avatar hawflau avatar heitorlessa avatar hjgraca avatar jfuss avatar jonife avatar jysheng123 avatar lucashuy avatar mgrandis avatar mildaniel avatar mndeveci avatar moelasmar avatar msailes avatar nikp avatar richarddd avatar simoncmoore avatar sleepwithcoffee avatar sriram-mv avatar techthoughts2 avatar torresxb1 avatar ulili5 avatar vaib-amz avatar valerena avatar wchengru avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aws-sam-cli-app-templates's Issues

Update README.md in project templates with relevant number of supported IDEs

The issue came from aws/aws-sam-cli#2363.

Running sam command:

sam init --no-input --name HelloWorld --runtime dotnetcore3.1 --dependency-manager cli-package --app-template hello-world

generates a project from a template that is cloned from

Cloning app templates from https://github.com/aws/aws-sam-cli-app-templates

These templates contains an outdated README.md file with limited number of supported IDEs:

...
...See the following links to get started.

* [PyCharm](https://docs.aws.amazon.com/toolkit-for-jetbrains/latest/userguide/welcome.html)
* [IntelliJ](https://docs.aws.amazon.com/toolkit-for-jetbrains/latest/userguide/welcome.html)
* [VS Code](https://docs.aws.amazon.com/toolkit-for-vscode/latest/userguide/welcome.html)
* [Visual Studio](https://docs.aws.amazon.com/toolkit-for-visual-studio/latest/user-guide/welcome.html)
...

Expected result:
List of links to get started contains relevant list of supported IDEs. Currently, the link https://docs.aws.amazon.com/toolkit-for-jetbrains/latest/userguide/welcome.html contains a reference to the following IDEs:

* CLion
* GoLand
* IntelliJ
* WebStorm
* Rider
* PhpStorm
* PyCharm
* RubyMine
* DataGrip

jest tests fail for s3 example after running sam build

In the node 14.x cookie-cutter-quick-start-s3 (i.e. the , the tests pass initially, but then fail after running sam build with the error message AccessDenied: Access Denied
.
I did notice that if Icd .aws-sam/build directory, run npm install and then npm run test they pass again.

Would it make sense to just exclude the build directory from jest?

Steps to repeat:

  1. sam init --runtime nodejs14.x --application-template quick-start-s3 --name test-tests
  2. sam build
  3. npm run test

Result:

Access denied on s3 object (see error below).

Expected Result:

Test should pass.

Platform: Mac OS

> jest

 PASS  __tests__/unit/handlers/s3-json-logger-handler.test.js
 FAIL  .aws-sam/build/S3JsonLoggerFunction/__tests__/unit/handlers/s3-json-logger-handler.test.js
  ● Console

    console.error
      Error calling S3 getObject: AccessDenied: Access Denied
          at Request.extractError (/initial/abs/path/replaced/test-tests/.aws-sam/build/S3JsonLoggerFunction/node_modules/aws-sdk/lib/services/s3.js:714:35)
          at Request.callListeners (/initial/abs/path/replaced/test-tests/.aws-sam/build/S3JsonLoggerFunction/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
          at Request.emit (/initial/abs/path/replaced/test-tests/.aws-sam/build/S3JsonLoggerFunction/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
          at Request.emit (/initial/abs/path/replaced/test-tests/.aws-sam/build/S3JsonLoggerFunction/node_modules/aws-sdk/lib/request.js:688:14)
          at Request.transition (/initial/abs/path/replaced/test-tests/.aws-sam/build/S3JsonLoggerFunction/node_modules/aws-sdk/lib/request.js:22:10)
          at AcceptorStateMachine.runTo (/initial/abs/path/replaced/test-tests/.aws-sam/build/S3JsonLoggerFunction/node_modules/aws-sdk/lib/state_machine.js:14:12)
          at /initial/abs/path/replaced/test-tests/.aws-sam/build/S3JsonLoggerFunction/node_modules/aws-sdk/lib/state_machine.js:26:10
          at Request.<anonymous> (/initial/abs/path/replaced/test-tests/.aws-sam/build/S3JsonLoggerFunction/node_modules/aws-sdk/lib/request.js:38:9)
          at Request.<anonymous> (/initial/abs/path/replaced/test-tests/.aws-sam/build/S3JsonLoggerFunction/node_modules/aws-sdk/lib/request.js:690:12)
          at Request.callListeners (/initial/abs/path/replaced/test-tests/.aws-sam/build/S3JsonLoggerFunction/node_modules/aws-sdk/lib/sequential_executor.js:116:18)
          at Request.emit (/initial/abs/path/replaced/test-tests/.aws-sam/build/S3JsonLoggerFunction/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
          at Request.emit (/initial/abs/path/replaced/test-tests/.aws-sam/build/S3JsonLoggerFunction/node_modules/aws-sdk/lib/request.js:688:14)
          at Request.transition (/initial/abs/path/replaced/test-tests/.aws-sam/build/S3JsonLoggerFunction/node_modules/aws-sdk/lib/request.js:22:10)
          at AcceptorStateMachine.runTo (/initial/abs/path/replaced/test-tests/.aws-sam/build/S3JsonLoggerFunction/node_modules/aws-sdk/lib/state_machine.js:14:12)
          at /initial/abs/path/replaced/test-tests/.aws-sam/build/S3JsonLoggerFunction/node_modules/aws-sdk/lib/state_machine.js:26:10
          at Request.<anonymous> (/initial/abs/path/replaced/test-tests/.aws-sam/build/S3JsonLoggerFunction/node_modules/aws-sdk/lib/request.js:38:9)
          at Request.<anonymous> (/initial/abs/path/replaced/test-tests/.aws-sam/build/S3JsonLoggerFunction/node_modules/aws-sdk/lib/request.js:690:12)
          at Request.callListeners (/initial/abs/path/replaced/test-tests/.aws-sam/build/S3JsonLoggerFunction/node_modules/aws-sdk/lib/sequential_executor.js:116:18)
          at callNextListener (/initial/abs/path/replaced/test-tests/.aws-sam/build/S3JsonLoggerFunction/node_modules/aws-sdk/lib/sequential_executor.js:96:12)
          at IncomingMessage.onEnd (/initial/abs/path/replaced/test-tests/.aws-sam/build/S3JsonLoggerFunction/node_modules/aws-sdk/lib/event_listeners.js:336:13)
          at IncomingMessage.emit (events.js:387:35)
          at IncomingMessage.emit (domain.js:470:12)
          at endReadableNT (internal/streams/readable.js:1317:12)
          at processTicksAndRejections (internal/process/task_queues.js:82:21) {
        code: 'AccessDenied',
        region: null,
        time: 2021-08-31T16:20:47.586Z,
        requestId: 'QB898AKXR59GP70N',
        extendedRequestId: 'qGySSYTirU6oUgrKkS+VEFSNWpxjUc/qDsTXVC71wF2NGe6k3W+iiJDM2b9Kj1zmW6RTxsvFYmI=',
        cfId: undefined,
        statusCode: 403,
        retryable: false,
        retryDelay: 35.078738053830946
      }

      17 |       console.info(data.Body.toString());
      18 |     }).catch(err => {
    > 19 |       console.error("Error calling S3 getObject:", err);
         |               ^
      20 |       return Promise.reject(err);
      21 |     })
      22 |   });

      at .aws-sam/build/S3JsonLoggerFunction/src/handlers/s3-json-logger.js:19:15
          at async Promise.all (index 0)
      at Object.<anonymous> (.aws-sam/build/S3JsonLoggerFunction/__tests__/unit/handlers/s3-json-logger-handler.test.js:32:5)

  ● Test s3JsonLoggerHandler › should read and log S3 objects

    AccessDenied: Access Denied

Bug: SAM init - graalvm runtime error

Description:

When using sam cli with runtime Java11 gradle dependency, sam build failed

Steps to reproduce:

sam init
1 - AWS Quick Start Templates
1 - Hello World Example
7 - java11
1 - gradle

docker build succeed, but failed on sam build

Observed result:

With --debug flag, we have:

022-06-09 09:41:08,428 | Failed to download image with name e
2022-06-09 09:41:08,428 | Container was not created. Skipping deletion
2022-06-09 09:41:08,431 | Sending Telemetry: {'metrics': [{'commandRun': {'requestId': 
'5777cbe1-b34f-4f54-a341-afb978bc8fb3', 'installationId': 'dead4f56-46b4-499b-9ed6-b28fe0cdc08a', 'sessionId': 
'508b3787-6163-49ec-affa-758d322ef03c', 'executionEnvironment': 'CLI', 'ci': False, 'pyversion': '3.8.13', 
'samcliVersion': '1.51.0', 'awsProfileProvided': False, 'debugFlagProvided': True, 'region': '', 'commandName': 
'sam build', 'metricSpecificAttributes': {'projectType': 'CFN'}, 'duration': 3623, 'exitReason': 
'DockerImagePullFailedException', 'exitCode': 255}}]}
2022-06-09 09:41:09,257 | HTTPSConnectionPool(host='aws-serverless-tools-telemetry.us-west-2.amazonaws.com', 
port=443): Read timed out. (read timeout=0.1)
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/aws-sam-cli/1.51.0/libexec/lib/python3.8/site-packages/docker/api/client.py", line 
261, in _raise_for_status
    response.raise_for_status()
  File "/opt/homebrew/Cellar/aws-sam-cli/1.51.0/libexec/lib/python3.8/site-packages/requests/models.py", line 
943, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: 
http+docker://localhost/v1.35/images/create?tag=latest&fromImage=e

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File 
"/opt/homebrew/Cellar/aws-sam-cli/1.51.0/libexec/lib/python3.8/site-packages/samcli/local/docker/manager.py", 
line 160, in pull_image
    result_itr = self.docker_client.api.pull(image_name, tag=tag, stream=True, decode=True)
  File "/opt/homebrew/Cellar/aws-sam-cli/1.51.0/libexec/lib/python3.8/site-packages/docker/api/image.py", line 
415, in pull
    self._raise_for_status(response)
  File "/opt/homebrew/Cellar/aws-sam-cli/1.51.0/libexec/lib/python3.8/site-packages/docker/api/client.py", line 
263, in _raise_for_status
    raise create_api_error_from_http_exception(e)
  File "/opt/homebrew/Cellar/aws-sam-cli/1.51.0/libexec/lib/python3.8/site-packages/docker/errors.py", line 31, 
in create_api_error_from_http_exception
    raise cls(e, response=response, explanation=explanation)
docker.errors.ImageNotFound: 404 Client Error: Not Found ("pull access denied for e, repository does not exist 
or may require 'docker login': denied: requested access to the resource is denied")

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File 
"/opt/homebrew/Cellar/aws-sam-cli/1.51.0/libexec/lib/python3.8/site-packages/samcli/local/docker/manager.py", 
line 85, in create
    self.pull_image(image_name)
  File 
"/opt/homebrew/Cellar/aws-sam-cli/1.51.0/libexec/lib/python3.8/site-packages/samcli/local/docker/manager.py", 
line 163, in pull_image
    raise DockerImagePullFailedException(str(ex)) from ex
samcli.local.docker.manager.DockerImagePullFailedException: 404 Client Error: Not Found ("pull access denied 
for e, repository does not exist or may require 'docker login': denied: requested access to the resource is 
denied")

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/homebrew/bin/sam", line 8, in <module>
    sys.exit(cli())
  File "/opt/homebrew/Cellar/aws-sam-cli/1.51.0/libexec/lib/python3.8/site-packages/click/core.py", line 829, 
in __call__
    return self.main(*args, **kwargs)
  File "/opt/homebrew/Cellar/aws-sam-cli/1.51.0/libexec/lib/python3.8/site-packages/click/core.py", line 782, 
in main
    rv = self.invoke(ctx)
  File "/opt/homebrew/Cellar/aws-sam-cli/1.51.0/libexec/lib/python3.8/site-packages/click/core.py", line 1259, 
in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/homebrew/Cellar/aws-sam-cli/1.51.0/libexec/lib/python3.8/site-packages/click/core.py", line 1066, 
in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/homebrew/Cellar/aws-sam-cli/1.51.0/libexec/lib/python3.8/site-packages/click/core.py", line 610, 
in invoke
    return callback(*args, **kwargs)
  File "/opt/homebrew/Cellar/aws-sam-cli/1.51.0/libexec/lib/python3.8/site-packages/click/decorators.py", line 
73, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/opt/homebrew/Cellar/aws-sam-cli/1.51.0/libexec/lib/python3.8/site-packages/click/core.py", line 610, 
in invoke
    return callback(*args, **kwargs)
  File 
"/opt/homebrew/Cellar/aws-sam-cli/1.51.0/libexec/lib/python3.8/site-packages/samcli/lib/telemetry/metric.py", 
line 166, in wrapped
    raise exception  # pylint: disable=raising-bad-type
  File 
"/opt/homebrew/Cellar/aws-sam-cli/1.51.0/libexec/lib/python3.8/site-packages/samcli/lib/telemetry/metric.py", 
line 124, in wrapped
    return_value = func(*args, **kwargs)
  File 
"/opt/homebrew/Cellar/aws-sam-cli/1.51.0/libexec/lib/python3.8/site-packages/samcli/lib/utils/version_checker.py", 
line 41, in wrapped
    actual_result = func(*args, **kwargs)
  File "/opt/homebrew/Cellar/aws-sam-cli/1.51.0/libexec/lib/python3.8/site-packages/samcli/cli/main.py", line 
87, in wrapper
    return func(*args, **kwargs)
  File 
"/opt/homebrew/Cellar/aws-sam-cli/1.51.0/libexec/lib/python3.8/site-packages/samcli/commands/build/command.py", 
line 182, in cli
    do_cli(
  File 
"/opt/homebrew/Cellar/aws-sam-cli/1.51.0/libexec/lib/python3.8/site-packages/samcli/commands/build/command.py", 
line 262, in do_cli
    ctx.run()
  File 
"/opt/homebrew/Cellar/aws-sam-cli/1.51.0/libexec/lib/python3.8/site-packages/samcli/commands/build/build_context.py", 
line 248, in run
    build_result = builder.build()
  File 
"/opt/homebrew/Cellar/aws-sam-cli/1.51.0/libexec/lib/python3.8/site-packages/samcli/lib/build/app_builder.py", 
line 219, in build
    return ApplicationBuildResult(build_graph, build_strategy.build())
  File 
"/opt/homebrew/Cellar/aws-sam-cli/1.51.0/libexec/lib/python3.8/site-packages/samcli/lib/build/build_strategy.py", 
line 75, in build
    result.update(self._build_functions(self._build_graph))
  File 
"/opt/homebrew/Cellar/aws-sam-cli/1.51.0/libexec/lib/python3.8/site-packages/samcli/lib/build/build_strategy.py", 
line 85, in _build_functions
    function_build_results.update(self.build_single_function_definition(build_definition))
  File 
"/opt/homebrew/Cellar/aws-sam-cli/1.51.0/libexec/lib/python3.8/site-packages/samcli/lib/build/build_strategy.py", 
line 156, in build_single_function_definition
    result = self._build_function(
  File 
"/opt/homebrew/Cellar/aws-sam-cli/1.51.0/libexec/lib/python3.8/site-packages/samcli/lib/build/app_builder.py", 
line 642, in _build_function
    return self._build_function_on_container(
  File 
"/opt/homebrew/Cellar/aws-sam-cli/1.51.0/libexec/lib/python3.8/site-packages/samcli/lib/build/app_builder.py", 
line 816, in _build_function_on_container
    self._container_manager.run(container)
  File 
"/opt/homebrew/Cellar/aws-sam-cli/1.51.0/libexec/lib/python3.8/site-packages/samcli/local/docker/manager.py", 
line 115, in run
    self.create(container)
  File 
"/opt/homebrew/Cellar/aws-sam-cli/1.51.0/libexec/lib/python3.8/site-packages/samcli/local/docker/manager.py", 
line 88, in create
    raise DockerImagePullFailedException(
samcli.local.docker.manager.DockerImagePullFailedException: Could not find e image locally and failed to pull 
it from docker.

Expected result:

A succeed build

Additional environment details (Ex: Windows, Mac, Amazon Linux etc)

  1. OS: Mac
  2. If using SAM CLI, sam --version: 1.51.0 and 1.52.0
  3. AWS region: any region

Add --debug flag to any SAM CLI commands you are running

HttpApi template wanted

Hoping to see something like:

Events:
        CatchAll:
          Type: HttpApi
          Properties:
            ApiId: !Ref Gateway
            Path: /{proxy+}
            Method: ANY

(ins)[hendry@t14s aws-sam-cli-app-templates]$ rg HttpApi
./python3.9/cookiecutter-aws-sam-step-functions-etl-python/.gitignore: line 171: error parsing glob '{{cookiecutter.project_name}}/*_output.yaml': nested alternate groups are not allowed

Throw users a bone? Show how to invoke step function locally USING the ASL file? Show how to see the local logs?

Trying the ruby 2.7 Stock Trader "example". (All the AWS guides seems to be pointedly silent on the subject of locally executing a step function as defined in a SAM project). There's a fair number of stackoverflow questions on this topic, none of which explain how to do it.

So a single, complete "how to test stock Trader step function locally" would be a most welcome addition to the docs since it includes multiple lambdas, a DB table and a step function.

I think I might be about half-way there... maybe someone else can help document the incantations needed to make it work locally, and to be able to view log results afterwards.

I did eventually find (by trial and error) that when using aws stepfunctions create-state-machine is is possible to specify a file (rather than enter the json on the command line per the online examples, which, let's face it, is a useless example).

And I did find out (again by trial and error) that one (apparently) needs to manually create a NEW json file with all the resource variables in the ASL file de-referenced by 'local' ARNs?

And (once again by trial an error) I found that the edits to that COPY of the ASL file go something like this:

${StockCheckerFunctionArn} -> arn:aws:lambda:us-east-1:123456789012:function:StockCheckerFunctionArn
${StockSellerFunctionArn} -> arn:aws:lambda:us-east-1:123456789012:function:StockSellerFunctionArn
${StockBuyerFunctionArn} -> arn:aws:lambda:us-east-1:123456789012:function:StockBuyerFunctionArn
${DDBPutItem} -> arn:aws:lambda:us-east-1:123456789012:transaction_table:DDBPutItem
${DDBTable} -> arn:aws:lambda:us-east-1:123456789012:transaction_table:TransactionTable

So if the edited ASL file is saved in a new folder in the SAM project, for example as edata/step1.asl.json, the step function can almost be tested locally using:

Mac terminal window # 1: sam local start-lambda
Mac terminal window # 2: docker run -p 8083:8083 amazon/aws-stepfunctions-local
Mac terminal window # 3 (note the use of file://): aws stepfunctions --endpoint http://localhost:8083 create-state-machine --definition file://edata/step1.asl.json --name StockTradingStateMachine --role-arn "arn:aws:iam::012345678901:role/StockTradingStateMachineRole"
then, to RUN it:
Mac terminal window # 4: aws stepfunctions --endpoint http://localhost:8083 describe-execution --execution-arn arn:aws:states:us-east-1:123456789012:execution:StockTradingStateMachine:test

The output of terminal # 4 finally shows something:

{
    "executionArn": "arn:aws:states:us-east-1:123456789012:execution:StockTradingStateMachine:test",
    "stateMachineArn": "arn:aws:states:us-east-1:123456789012:stateMachine:StockTradingStateMachine",
    "name": "test",
    "status": "RUNNING",
    "startDate": "2021-04-21T14:55:12.961000-10:00",
    "input": "{}",
    "inputDetails": {
        "included": true
    }
}

But the output stream in terminal # 2 shows the error:

2021-04-22 00:58:34.179: arn:aws:states:us-east-1:123456789012:execution:StockTradingStateMachine:test : {"Type":"ExecutionFailed","PreviousEventId":20,"ExecutionFailedEventDetails":{"Error":"Lambda.AWSLambdaException","Cause":"The security token included in the request is invalid. (Service: AWSLambda; Status Code: 403; Error Code: UnrecognizedClientException; Request ID: 2cd8222b-5f6e-4b1e-8263-d34438d713c9; Proxy: null)"}}

The examples I've found also fail to show how to provide a test input event to a step function. (The -e flag used when locally invoking Lambdas does not seem to work.)

Gradle wrapper in Java templates too far out of date

On systems where JVM 15 is the default, the GradleBuild workflow will always fail:

/usr/libexec/java_home -V
Matching Java Virtual Machines (3):
    15.0.2, x86_64:	"Amazon Corretto 15"	/Library/Java/JavaVirtualMachines/amazon-corretto-15.jdk/Contents/Home
    11.0.9.1, x86_64:	"Amazon Corretto 11"	/Library/Java/JavaVirtualMachines/amazon-corretto-11.jdk/Contents/Home
    1.8.0_275, x86_64:	"Amazon Corretto 8"	/Library/Java/JavaVirtualMachines/amazon-corretto-8.jdk/Contents/Home

/Library/Java/JavaVirtualMachines/amazon-corretto-15.jdk/Contents/Home
$ sam init --name j11 --runtime java11 --app-template hello-world --package-type Zip --dependency-manager gradle
$ cd j11
<j11> $ sam build --template template.yaml

Building codeuri: HelloWorldFunction runtime: java11 metadata: {} functions: ['HelloWorldFunction']
/Users/richali/tmp/sam/j11/HelloWorldFunction/gradlew is using a JVM with major version 15 which is newer than 11 that is supported by AWS Lambda. The compiled function code may not run in AWS Lambda unless the project has been configured to be compatible with Java 11 using 'targetCompatibility' in Gradle.
Running JavaGradleWorkflow:GradleBuild

Build Failed
Error: JavaGradleWorkflow:GradleBuild - Gradle Failed: FAILURE: Build failed with an exception.

* What went wrong:
Could not open cp_init remapped class cache for 8kkh2ehmk58t6twxmma1ubqof (/Users/richali/.gradle/caches/5.1.1/scripts-remapped/lambda_build_init_7epsn6nrbbjv0w9bodo48jyjo/8kkh2ehmk58t6twxmma1ubqof/cp_init13bba240a07c562d578336deed5b2fbf).
> Could not open cp_init generic class cache for initialization script '/var/folders/5s/kz556x054vz8l7204yh4j9krq6bwmm/T/tmpr934w_w0/lambda-build-init.gradle' (/Users/richali/.gradle/caches/5.1.1/scripts/8kkh2ehmk58t6twxmma1ubqof/cp_init/cp_init13bba240a07c562d578336deed5b2fbf).
   > Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s

Fix is to update the gradle wrapper:

<j11> $ (cd HelloWorldFunction && ./gradlew wrapper --gradle-version=6.8.2 --distribution-type=bin)

BUILD SUCCESSFUL in 3s
1 actionable task: 1 executed

<j11> $ sam build --template template.yaml
Building codeuri: HelloWorldFunction runtime: java11 metadata: {} functions: ['HelloWorldFunction']
/Users/richali/tmp/sam/j11/HelloWorldFunction/gradlew is using a JVM with major version 15 which is newer than 11 that is supported by AWS Lambda. The compiled function code may not run in AWS Lambda unless the project has been configured to be compatible with Java 11 using 'targetCompatibility' in Gradle.
Running JavaGradleWorkflow:GradleBuild
Running JavaGradleWorkflow:CopyArtifacts

Build Succeeded

Additionally, it's probably a good idea to have the targetCompatibility parameter defined by default in the templates, since at least on macOS the standard behavior is to use the latest JVM available

Getting started guide for running tests

Is it possible to document how to run the tests in each repo? For example, I found the following with respect to the python examples

https://stackoverflow.com/a/59377075/3543867

$ python3 -m venv venv
$ source venv/bin/activate
(venv) $ pip3 install pytest
(venv) $ pip3 install pytest-mock
(venv) $ python3 -m pytest tests/ -v

Which would probably be better served by doing a pip3 install -r test/requirements.txt as the above misses boto3. But when I try to run python3 -m pytest tests/ -v, I get the following output..

$ python3 -m pytest tests/
============================================ test session starts =============================================
platform linux -- Python 3.8.5, pytest-6.2.5, py-1.10.0, pluggy-1.0.0
rootdir: /home/user/sam/app/sam-app
plugins: mock-3.6.1
collected 0 items / 2 errors

=================================================== ERRORS ===================================================
___________________________ ERROR collecting tests/integration/test_api_gateway.py ___________________________
ImportError while importing test module '/home/user/sam/app/sam-app/tests/integration/test_api_gateway.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/integration/test_api_gateway.py:5: in <module>
    import requests
E   ModuleNotFoundError: No module named 'requests'
________________________________ ERROR collecting tests/unit/test_handler.py _________________________________
ImportError while importing test module '/home/user/sam/app/sam-app/tests/unit/test_handler.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/unit/test_handler.py:5: in <module>
    from hello_world import app
hello_world/app.py:3: in <module>
    import requests
E   ModuleNotFoundError: No module named 'requests'
========================================== short test summary info ===========================================
ERROR tests/integration/test_api_gateway.py
ERROR tests/unit/test_handler.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
============================================= 2 errors in 0.14s ==============================================

Error: Template file not found at /Users/myuser/path/to/project/template.yml

Hi team, I'm following the instructions to get set up with AWS SAM Hello World app.
The README file says this:

TO build and deploy your application for the first time, run the following in your shell:
sam build
sam deploy --guided

When I run sam build, it shows this error:

Error: Template file not found at /Users/myuser/path/to/project/template.yml

The Hello World app generates a file called template.yaml, not template.yml.

Add TypeScript examples to the NodeJs templates

What is this?

This issue is to track the work I am doing in a fork to add a TypeScript NodeJS example template. The TypeScript template should include the following items:

  • Handlers and all function code in TypeScript
  • Unit Tests written in TypeScript
  • Example code for mocking dependencies in tests.
  • Scaffolding for an API Gateway based function
  • Linting integration
  • Successful Transpilation to JavaScript

The template is built, tested and has been deployed into my AWS environment without issues. I'm not ready to start the process of issuing a pull request back to this repository.

Guidance

I searched for documentation on contributing templates and wasn't able to find much to help me meet the AWS teams expectations for what a template should consist of. I have the following questions I'd appreciate some guidance to help me prepare for the pull request.

  1. The template is an API Gateway based template. Is a post and get-by-id handler example sufficient or do I need more HTTP methods?
  2. How should the template be named? At the moment I have called it cookiecutter-typescript-app-template and it resides within the nodejs12.x directory. I see there is a nodejs.x-image directory but I am unsure of what that directory represents and if I need to support it.
  3. I built this for the nodejs12.x runtime. Do I have to build a version for the nodejs10.x runtime? If so, can it be done as a separate PR?

I will submit my pull request this evening and reference this issue in the PR.

Thanks!

sam init: "Error: Multiple lambda image application templates found"

This started happening in our CI today. Maybe caused by 27dce06 ?

$ sam init --name testProject --no-interactive --dependency-manager pip --package-type Image --base-image amazon/python3.8-base

Cloning app templates from https://github.com/aws/aws-sam-cli-app-templates
Error: Multiple lambda image application templates found. This should not be possible, please raise an issue.

Note the above command uses python3.8-base ; this does not happen with e.g. python3.7-base :

$ sam init --name testProject --no-interactive --dependency-manager pip --package-type Image --base-image amazon/python3.7-base

New "EventBridge Hello World" python throws "Invalid value for `detail`, must not be `None`" upon invoke

When creating a new "EventBridge Hello World" python application using AWS SAM, it throws the error Invalid value for detail, must not be None upon sam invoke. This is using these cookiecutter templates so that's why I'm posting the issue here.

I'm running:

  • SAM CLI, version 1.23.0.
  • Docker version 20.10.2, build 2291f61
  • macOS big Sur, version 11.2.3

Run following commands to replicate:

sam init
# 1 - AWS Quick Start Templates
# 1 - Zip
# 2 - python3.8
# 2 - EventBridge Hello World
cd hello-world
git init
sam validate
sam build
sam local invoke

The full error message is this:

$ sam local invoke
Invoking hello_world/app.lambda_handler (python3.8)
Skip pulling image and use local one: amazon/aws-sam-cli-emulation-image-python3.8:rapid-1.23.0.

Mounting /Users/<my_name>/code/persoonlijk/sam-change-detection/.aws-sam/build/HelloWorldFunction as /var/task:ro,delegated inside runtime container
START RequestId: 45b648a6-ba43-4a9b-b7ef-a413eba9548b Version: $LATEST
    raise ValueError("Invalid value for `detail`, must not be `None`")  # noqa: E501
END RequestId: 45b648a6-ba43-4a9b-b7ef-a413eba9548b
REPORT RequestId: 45b648a6-ba43-4a9b-b7ef-a413eba9548b	Init Duration: 0.23 ms	Duration: 125.14 ms	Billed Duration: 200 ms	Memory Size: 128 MB	Max Memory Used: 128 MB
{"errorMessage": "Invalid value for `detail`, must not be `None`", "errorType": "ValueError", "stackTrace": ["  File \"/var/task/hello_world/app.py\", line 29, in lambda_handler\n    awsEvent:AWSEvent = Marshaller.unmarshall(event, AWSEvent)\n", "  File \"/var/task/model/aws/ec2/marshaller.py\", line 76, in unmarshall\n    return cls.__unmarshall_model(data, typeName)\n", "  File \"/var/task/model/aws/ec2/marshaller.py\", line 122, in __unmarshall_model\n    instance = typeName(**kwargs)\n", "  File \"/var/task/model/aws/ec2/aws_event.py\", line 47, in __init__\n    self.detail = detail\n", "  File \"/var/task/model/aws/ec2/aws_event.py\", line 66, in detail\n    raise ValueError(\"Invalid value for `detail`, must not be `None`\")  # noqa: E501\n"]}%

Error: Lambda Runtime dotnet5.0 and dependency manager cli-package does not have an available initialization template

"Create new SAM application" command in VS code with dotnet5.0 image keeps failing

Repro Steps

  1. Install AWS Toolkit for VS code
  2. Press F1 and run 'AWS: Create new SAM application'
  3. Choose dotnet5.0 as the image and give a project name

Expected Result
Scaffolds a helloworld dotnet5 application

Actual Result
Fails with "Error: Lambda Runtime dotnet5.0 and dependency manager cli-package does not have an available initialization template"

Environment
Tried on both Windows 10 and an EC2 linux machine

AWS Toolkit Logs
2021-03-01 22:27:25 [INFO]: Running: (not started) [/usr/local/bin/sam init --name lambda-dotnet5.0 --no-interactive --dependency-manager cli-package --package-type Image --base-image amazon/dotnet5.0-base]
2021-03-01 22:27:26 [ERROR]: Unexpected exitcode (1), expecting (0)
2021-03-01 22:27:26 [ERROR]: An error occurred while creating a new SAM Application. Check the logs for more information by running the "View AWS Toolkit Logs" command from the Command Palette.
2021-03-01 22:27:26 [ERROR]: Error: undefined
2021-03-01 22:27:26 [ERROR]: stderr: Cloning app templates from https://github.com/aws/aws-sam-cli-app-templates
,Error: Lambda Runtime dotnet5.0 and dependency manager cli-package does not have an available initialization template.
2021-03-01 22:27:26 [ERROR]: stdout:
2021-03-01 22:27:26 [ERROR]: Error creating new SAM Application: [Error: Error with child process: Cloning app templates from https://github.com/aws/aws-sam-cli-app-templates
,Error: Lambda Runtime dotnet5.0 and dependency manager cli-package does not have an available initialization template.
at Object.t.logAndThrowIfUnexpectedExitCode (/.vscode-server/extensions/amazonwebservices.aws-toolkit-vscode-1.20.0/dist/extension.js:2:552517)
at Object. (
/.vscode-server/extensions/amazonwebservices.aws-toolkit-vscode-1.20.0/dist/extension.js:2:8146184)
at Generator.next ()
at o (~/.vscode-server/extensions/amazonwebservices.aws-toolkit-vscode-1.20.0/dist/extension.js:2:8145359)
at processTicksAndRejections (internal/process/task_queues.js:97:5)]
2021-03-01 22:31:58 [INFO]: Successfully sent a telemetry batch of 5

SQS Template not working: Model validation failed, EventSourceArn: failed validation constraint for keyword

Description:

First time sam user. But example created with wizard for SQS/Lambda is not working.

Steps to reproduce:

sam init
   use ZIP
   use original  example template SQS
sam build
sam deploy --guided

Observed result:

CREATE_FAILED. AWS::Lambda::EventSourceMapping SQSPayloadLoggerSQSQueueEvent
Resource handler returned message: "Model validation failed (#/EventSourceArn: failed validation constraint for keyword [pattern])" HandlerErrorCode. InvalidRequest)
The following resource(s) failed to create:
[SQSPayloadLoggerSQSQueueEvent]. Rollback requested by user.

Expected result:

to work

Additional environment details (Ex: Windows, Mac, Amazon Linux etc)

  1. OS: OSX Monterrey current
  2. If using SAM CLI, sam --version: 1.35.0
  3. AWS region: eu-central-1

Quick Start Template for TypeScript Serverless APIs

Describe your idea/feature/enhancement

I wish SAM CLI offers the capability to automatically scaffold AWS Quick Start - serverless APIs for TypeScript.

Proposal

Add a nodejs14.x - TypeScript option on sam init process for Quick Start templates of Serverless APIs.

Node SQS sample templates are missing mandatory SQS polling policy

In order for Lambda to be able to poll from an SQS queue, we must specify the SQSPollerPolicy policy, pointing to the relevant SQS queue:

Policies:
  - SQSPollerPolicy:
      QueueName: !GetAtt SimpleQueue.QueueName

This policy is missing in all SQS sample templates, thus sam deploy always fails with the following CloudFormation error:

The followingfailed to create: [SQSPayloadLoggerSQSQueueEvent].Resource handlermessage: "Modelfailed (#/EventSourceArn:failed validationconstraint for keyword[pattern])" (RequestToken:9de0e5cc-cd9f-fc71-6a75-7abfb2088f62,HandlerErrorCode:InvalidRequest)

Bug: sam init graalvm.java11

Description:

Trying sam init for graalvm.java11 hello world example generates project with samconfig.toml file inside HelloWorldFunction folder. I have impression that it is not the proper file location - shouldn't it be located in the project base folder - on the same level as template.yaml file, instead?

Steps to reproduce:

sam init

1 - AWS Quick Start Templates
1 - Hello World Example
Use the most popular runtime and package type? (Python and zip) [y/N]: n
5 - graalvm.java11 (provided.al2)
Which dependency manager would you like to use?
1 - gradle
Would you like to enable X-Ray tracing on the function(s) in your application? [y/N]: y

Observed result:

sam build is not being executed inside the container

Expected result:

samconfig.toml to be located in the main project folder - the same level as template.yaml file is located

Additional environment details (Ex: Windows, Mac, Amazon Linux etc)

  1. OS: macOS Monterey 12.4
  2. sam --version: SAM CLI, version 1.51.0
  3. AWS region: any

Request for Documentation on creating custom template repository and templates

When launching sam init it gives you the ability to build from custom templates in a custom repository. Is there documentation (or pointers) on how to set that up and write the custom templates. (It looks like they are cookie cutter underneath; however some docs would help.

Generally, my team would like to be able to generate lambda projects from basic standard. -Thanks

Unable to create state machine locally with step-functions-sample-app. Ran into SCHEMA_VALIDATION_FAILED: Value is not a valid resource ARN at /States/Check Stock Value/Resource

Description:
Trying to run AWS Steps Function locally using SAM CLI for the first time. Followed the guide but couldn't get state machine created locally for step-functions-sample-app

Steps to reproduce:
Downloaded step-functions-sample-app via sam init

sam init
Which template source would you like to use?
	1 - AWS Quick Start Templates
	2 - Custom Template Location
Choice: 1

Cloning from https://github.com/aws/aws-sam-cli-app-templates

Choose an AWS Quick Start application template
	1 - Hello World Example
	2 - Multi-step workflow
	3 - Serverless API
	4 - Scheduled task
	5 - Standalone function
	6 - Data processing
	7 - Infrastructure event management
	8 - Machine Learning
Template: 2

Which runtime would you like to use?
	1 - dotnetcore3.1
	2 - go1.x
	3 - java11
	4 - java8.al2
	5 - java8
	6 - nodejs14.x
	7 - nodejs12.x
	8 - python3.9
	9 - python3.8
	10 - python3.7
	11 - python3.6
	12 - ruby2.7
Runtime: 9

Based on your selections, the only Package type available is Zip.
We will proceed to selecting the Package type as Zip.

Based on your selections, the only dependency manager available is pip.
We will proceed copying the template using pip.

Project name [sam-app]: 

    -----------------------
    Generating application:
    -----------------------
    Name: sam-app
    Runtime: python3.8
    Architectures: x86_64
    Dependency Manager: pip
    Application Template: step-functions-sample-app
    Output Directory: .
    
    Next steps can be found in the README file at ./sam-app/README.md
        

    Commands you can use next
    =========================
    [*] Create pipeline: cd sam-app && sam pipeline init --bootstrap
    [*] Test Function in the Cloud: sam sync --stack-name {stack-name} --watch

Built the app

cd sam-app && sam build

Started AWS SAM CLI local from the app directory

sam local start-lambda
Starting the Local Lambda Service. You can now invoke your Lambda Functions defined in your template through the endpoint.
2022-02-09 00:32:19  * Running on http://127.0.0.1:3001/ (Press CTRL+C to quit)

Started Step Functions Local via docker -

docker run -p 8083:8083 amazon/aws-stepfunctions-local

As a next step, tried to create state machine locally but it failed

aws stepfunctions --debug --endpoint http://localhost:8083 create-state-machine --definition file:///Users/ashish.walia/sam-app/statemachine/stock_trader.asl.json --name "StockTrading" --role-arn "arn:aws:iam::012345678901:role/DummyRole

Ref - stock_trader.asl.json

Observed result:

An error occurred (InvalidDefinition) when calling the CreateStateMachine operation: Invalid State Machine Definition: ''SCHEMA_VALIDATION_FAILED: Value is not a valid resource ARN at /States/Check Stock Value/Resource', 'SCHEMA_VALIDATION_FAILED: Value is not a valid resource ARN at /States/Sell Stock/Resource', 'SCHEMA_VALIDATION_FAILED: Value is not a valid resource ARN at /States/Buy Stock/Resource', 'SCHEMA_VALIDATION_FAILED: Value is not a valid resource ARN at /States/Record Transaction/Resource''

Expected result:
Expecting state machine to get created

Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
OS: macOS Monterey 12.2
If using SAM CLI, sam --version: 1.37.0
AWS region: us-east-1

Add MemorySize and Timeout to HelloWorld template

Describe your idea/feature/enhancement

I wish SAM CLI would explicitly add the MemorySize and Timeout to the Lambda function resource in the default Hello World template. This way, as one adapts the template by adding resources, including dependencies, the template makes it explicit that these are two parameters that one can modify.

Proposal

Add details of how to add this to the product.

The changes are simple: two extra lines on the default HelloWorld template.

Things to consider:

  1. Will this require any updates to the SAM Spec

Additional Details

Java 11 -> gradle -> step function appears to not be accessable from SAM cli

if I do sam init and select

Quick start template -> Zip -> Java 11 runtime -> Gradle -> Step functions sample app

then sam cli selects an 'EventBridge' app, displaying event bridge options:

Do you want to use the default AWS profile [default] and region [eu-west-1]? [Y/n]: y

Which Schema would you like to use?
	1 - aws.a4b@RoomStateChange
	2 - aws.athena@AthenaQueryStateChange
	3 - aws.autoscaling@AWSAPICallViaCloudTrail
	4 - aws.autoscaling@EC2InstanceLaunchLifecycleAction
	5 - aws.autoscaling@EC2InstanceLaunchSuccessful
	6 - aws.autoscaling@EC2InstanceLaunchUnsuccessful
	7 - aws.autoscaling@EC2InstanceTerminateLifecycleAction
	8 - aws.autoscaling@EC2InstanceTerminateSuccessful
	9 - aws.autoscaling@EC2InstanceTerminateUnsuccessful
	10 - aws.batch@AWSAPICallViaCloudTrail

the expected behaviour would be what happens when the the above is performed with thejava 8 runtime selected - pulling the step-functions-app-template:

   Generating application:
    -----------------------
    Name: hw-step2
    Runtime: java8
    Dependency Manager: gradle
    Application Template: step-functions-sample-app
    Output Directory: .

bug: setting the prompted architectures generates an error

Issue

I am running SAM CLI, version 1.36.0 and when I try to input the architectures prompted by Cookiecutter I get an Error: Unable to decode to JSON. error. And this might not be intuitive for a first time user

sam init --location cookiecutter-aws-sam-eventbridge-hello-java-gradle
project_name [Your EventBridge Starter app]: x
runtime [java11]:
architectures [default]: arm64
Error: Unable to decode to JSON.

Work around

If I set the input to {"value":["arm64"]} for architectures then this works.

sam init --location cookiecutter-aws-sam-eventbridge-hello-java-gradle
project_name [Your EventBridge Starter app]: x
runtime [java11]:
architectures [default]: {"value":["arm64"]}

Or if I pass in architecture in the cli and not enter anything in architectures:

sam init --location java11/cookiecutter-aws-sam-eventbridge-hello-java-gradle --architecture arm64

Possible Solution

  • Change the architectures in cookiecutter.json to be a simple string value like runtime, this would mean change all of the templates and CLI

Example for Go with AL2 base

The current Go examples use the go1.x Lambda runtime, which is announced as being considered legacy as it uses Amazon Linux, and does not support newer Lambda features such as ARM/Graviton2 support. Could they either be updated to use the provided.al2 runtime, or have a separate provided.al2 Go example available?

It looks like there's already a SAM example for it published by AWS, so it could just be a case of bringing that over to this repo and making any minor changes required to make it easily available within the sam init workflow.

Thanks!

Cache layer with docker to speed up the development workflow

Describe your idea/feature/enhancement

[Project: sam init - python 3.8 - image container (not zip file)]
sam build always rebuild the image even if:

  • requirements.txt is not changed
  • the code is not changed

Proposal

At least in development, we could change to Dockerfile to cache the layers that didn't changed, such as requirments.txt. When someone has a slow connection, it take A LOT of time.

In order to do this, the default Dockerfile should be changed in:
New Dockerfile

FROM public.ecr.aws/lambda/python:3.8 AS build

COPY requirements.txt ./
RUN python3.8 -m pip install -r requirements.txt -t .

COPY app.py ./
COPY model /opt/ml/model

CMD ["app.lambda_handler"]

Old Dockerfile

FROM public.ecr.aws/lambda/python:3.8

COPY app.py requirements.txt ./
COPY model /opt/ml/model

RUN python3.8 -m pip install -r requirements.txt -t .

CMD ["app.lambda_handler"]

Additional Details

Add official template for Lambda Powertools for (Python, Java, Typescript)

It would be a great value from a productivity point of view to add a template for AWS Lambda Powertool, much like AWS Lambda Powertools Python, AWS Lambda Powertools Java & AWS Lambda Powertools Typescript

I would be able to contribute if this is accepted.

Currently you can do the following, but having an official one would increase discoverability:

# Java
sam init --location gh:aws-samples/cookiecutter-aws-sam-powertools-java
# Python
sam init --location gh:aws-samples/cookiecutter-aws-sam-python

Correct dotnet6 hello-step-functions-sample-app

The dotnet6 hello-step-functions-sample-app is not working as expected.

After deploying the project created from this template. If you try to test the project by running the AWS Step Functions state machine it is failing because all the 3 Lambda functions are returning empty JSON payload {} that's making the Step Functions state machine to fail.

The root cause is that all C# contract call have only filed they do not have proprieties meaning get; set; when the object is serialized it returns empty JSON {}

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.