-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
717 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import json | ||
|
||
def handler(event, context): | ||
return { | ||
'statusCode': 200, | ||
'body': json.dumps('Hello from Lambda!') | ||
} |
Binary file added
BIN
+13.3 MB
...ct.js.snapshot/asset.5d8d1d0aacea23824c62f362e1e3c14b7dd14a31c71b53bfae4d14a6373c5510.zip
Binary file not shown.
98 changes: 98 additions & 0 deletions
98
...t.js.snapshot/asset.6412a5f4524c6b41d26fbeee226c68c2dad735393940a51008d77e6f8b1038f5.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
{ | ||
"AWSTemplateFormatVersion" : "2010-09-09", | ||
|
||
"Description" : "AWS Service Catalog sample template. Creates an Amazon EC2 instance running the Amazon Linux AMI. The AMI is chosen based on the region in which the stack is run. This example creates an EC2 security group for the instance to give you SSH access. **WARNING** This template creates an Amazon EC2 instance. You will be billed for the AWS resources used if you create a stack from this template.", | ||
|
||
"Parameters" : { | ||
"KeyName": { | ||
"Description" : "Name of an existing EC2 key pair for SSH access to the EC2 instance.", | ||
"Type": "AWS::EC2::KeyPair::KeyName" | ||
}, | ||
|
||
"InstanceType" : { | ||
"Description" : "EC2 instance type.", | ||
"Type" : "String", | ||
"Default" : "t2.micro", | ||
"AllowedValues" : [ "t2.micro", "t2.small", "t2.medium"] | ||
}, | ||
|
||
"SSHLocation" : { | ||
"Description" : "The IP address range that can SSH to the EC2 instance.", | ||
"Type": "String", | ||
"MinLength": "9", | ||
"MaxLength": "18", | ||
"Default": "0.0.0.0/0", | ||
"AllowedPattern": "(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})/(\\d{1,2})", | ||
"ConstraintDescription": "Must be a valid IP CIDR range of the form x.x.x.x/x." | ||
} | ||
}, | ||
|
||
"Metadata" : { | ||
"AWS::CloudFormation::Interface" : { | ||
"ParameterGroups" : [{ | ||
"Label" : {"default": "Instance configuration"}, | ||
"Parameters" : ["InstanceType"] | ||
},{ | ||
"Label" : {"default": "Security configuration"}, | ||
"Parameters" : ["KeyName", "SSHLocation"] | ||
}], | ||
"ParameterLabels" : { | ||
"InstanceType": {"default": "Server size:"}, | ||
"KeyName": {"default": "Key pair:"}, | ||
"SSHLocation": {"default": "CIDR range:"} | ||
} | ||
} | ||
}, | ||
|
||
"Mappings" : { | ||
"AWSRegionArch2AMI" : { | ||
"us-east-1" : { "HVM64" : "ami-08842d60" }, | ||
"us-west-2" : { "HVM64" : "ami-8786c6b7" }, | ||
"us-west-1" : { "HVM64" : "ami-cfa8a18a" }, | ||
"eu-west-1" : { "HVM64" : "ami-748e2903" }, | ||
"ap-southeast-1" : { "HVM64" : "ami-d6e1c584" }, | ||
"ap-northeast-1" : { "HVM64" : "ami-35072834" }, | ||
"ap-southeast-2" : { "HVM64" : "ami-fd4724c7" }, | ||
"sa-east-1" : { "HVM64" : "ami-956cc688" }, | ||
"cn-north-1" : { "HVM64" : "ami-ac57c595" }, | ||
"eu-central-1" : { "HVM64" : "ami-b43503a9" } | ||
} | ||
|
||
}, | ||
|
||
"Resources" : { | ||
"EC2Instance" : { | ||
"Type" : "AWS::EC2::Instance", | ||
"Properties" : { | ||
"InstanceType" : { "Ref" : "InstanceType" }, | ||
"SecurityGroups" : [ { "Ref" : "InstanceSecurityGroup" } ], | ||
"KeyName" : { "Ref" : "KeyName" }, | ||
"ImageId" : { "Fn::FindInMap" : [ "AWSRegionArch2AMI", { "Ref" : "AWS::Region" }, "HVM64" ] } | ||
} | ||
}, | ||
|
||
"InstanceSecurityGroup" : { | ||
"Type" : "AWS::EC2::SecurityGroup", | ||
"Properties" : { | ||
"GroupDescription" : "Enable SSH access via port 22", | ||
"SecurityGroupIngress" : [ { | ||
"IpProtocol" : "tcp", | ||
"FromPort" : "22", | ||
"ToPort" : "22", | ||
"CidrIp" : { "Ref" : "SSHLocation"} | ||
} ] | ||
} | ||
} | ||
}, | ||
|
||
"Outputs" : { | ||
"PublicDNSName" : { | ||
"Description" : "Public DNS name of the new EC2 instance", | ||
"Value" : { "Fn::GetAtt" : [ "EC2Instance", "PublicDnsName" ] } | ||
}, | ||
"PublicIPAddress" : { | ||
"Description" : "Public IP address of the new EC2 instance", | ||
"Value" : { "Fn::GetAtt" : [ "EC2Instance", "PublicIp" ] } | ||
} | ||
} | ||
} |
Oops, something went wrong.