Skip to content

Commit e9c1f9b

Browse files
committed
rename coockie-cutter directory to python3.9
1 parent a3f40e6 commit e9c1f9b

9 files changed

Lines changed: 91 additions & 0 deletions

File tree

tests/functional/testdata/init/unknown_runtime/python3.8/cookiecutter-aws-sam-hello/__init__.py renamed to tests/functional/testdata/init/unknown_runtime/python3.9/cookiecutter-aws-sam-hello/__init__.py

File renamed without changes.

tests/functional/testdata/init/unknown_runtime/python3.8/cookiecutter-aws-sam-hello/cookiecutter.json renamed to tests/functional/testdata/init/unknown_runtime/python3.9/cookiecutter-aws-sam-hello/cookiecutter.json

File renamed without changes.

tests/functional/testdata/init/unknown_runtime/python3.8/cookiecutter-aws-sam-hello/setup.cfg renamed to tests/functional/testdata/init/unknown_runtime/python3.9/cookiecutter-aws-sam-hello/setup.cfg

File renamed without changes.

tests/functional/testdata/init/unknown_runtime/python3.9/cookiecutter-aws-sam-hello/{{cookiecutter.project_name}}/__init__.py

Whitespace-only changes.

tests/functional/testdata/init/unknown_runtime/python3.9/cookiecutter-aws-sam-hello/{{cookiecutter.project_name}}/hello_world/__init__.py

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import json
2+
3+
# import requests
4+
5+
6+
def lambda_handler(event, context):
7+
"""Sample pure Lambda function
8+
9+
Parameters
10+
----------
11+
event: dict, required
12+
API Gateway Lambda Proxy Input Format
13+
14+
Event doc: https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-lambda-proxy-integrations.html#api-gateway-simple-proxy-for-lambda-input-format
15+
16+
context: object, required
17+
Lambda Context runtime methods and attributes
18+
19+
Context doc: https://docs.aws.amazon.com/lambda/latest/dg/python-context-object.html
20+
21+
Returns
22+
------
23+
API Gateway Lambda Proxy Output Format: dict
24+
25+
Return doc: https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-lambda-proxy-integrations.html
26+
"""
27+
28+
# try:
29+
# ip = requests.get("http://checkip.amazonaws.com/")
30+
# except requests.RequestException as e:
31+
# # Send some context about this error to Lambda Logs
32+
# print(e)
33+
34+
# raise e
35+
36+
return {
37+
"statusCode": 200,
38+
"body": json.dumps(
39+
{
40+
"message": "hello world",
41+
# "location": ip.text.replace("\n", "")
42+
}
43+
),
44+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
requests
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
AWSTemplateFormatVersion: '2010-09-09'
2+
Transform: AWS::Serverless-2016-10-31
3+
Description: >
4+
{{ cookiecutter.project_name }}
5+
6+
Sample SAM Template for {{ cookiecutter.project_name }}
7+
8+
# More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst
9+
Globals:
10+
Function:
11+
Timeout: 3
12+
13+
Resources:
14+
HelloWorldFunction:
15+
Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction
16+
Properties:
17+
CodeUri: hello_world/
18+
Handler: app.lambda_handler
19+
Runtime: python3.9
20+
{%- if cookiecutter.architectures.value != []%}
21+
Architectures:
22+
{%- for arch in cookiecutter.architectures.value %}
23+
- {{arch}}
24+
{%- endfor %}
25+
{%- endif %}
26+
Events:
27+
HelloWorld:
28+
Type: Api # More info about API Event Source: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#api
29+
Properties:
30+
Path: /hello
31+
Method: get
32+
33+
Outputs:
34+
# ServerlessRestApi is an implicit API created out of Events key under Serverless::Function
35+
# Find out more about other implicit resources you can reference within SAM
36+
# https://github.com/awslabs/serverless-application-model/blob/master/docs/internals/generated_resources.rst#api
37+
HelloWorldApi:
38+
Description: "API Gateway endpoint URL for Prod stage for Hello World function"
39+
Value: !Sub "https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/hello/"
40+
HelloWorldFunction:
41+
Description: "Hello World Lambda Function ARN"
42+
Value: !GetAtt HelloWorldFunction.Arn
43+
HelloWorldFunctionIamRole:
44+
Description: "Implicit IAM Role created for Hello World function"
45+
Value: !GetAtt HelloWorldFunctionRole.Arn
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The file was provided to confirm that all unsupported runtime were eliminated and only supported runtime was provided to the customer to select

0 commit comments

Comments
 (0)