Skip to content

Commit

Permalink
Appsync release (#246)
Browse files Browse the repository at this point in the history
* Readme change

* Readme change

* Update base build image, python, and java versions

* corretto17

* Python and java versions

* Install corretto11 on CodeBuild 4.0

* Remove java runtime versions

* Replace python3.7 with 3.9

* Java11

---------

Co-authored-by: Eric Beard <[email protected]>
  • Loading branch information
ericzbeard and ezbeard-github-test authored Oct 13, 2023
1 parent 33664cc commit dd6e6d4
Show file tree
Hide file tree
Showing 71 changed files with 196 additions and 124 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dependency.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
needs: req-files
strategy:
matrix:
python: [ 3.7, 3.8, 3.9, "3.10" ]
python: [ 3.8, 3.9, "3.10" ]
os: [ubuntu-latest]
files: ${{ fromJSON(needs.req-files.outputs.reqfiles) }}
runs-on: ${{ matrix.os }}
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,10 @@ import ResourceModel` or they won't work when deployed.
In order to run SAM to test your resource, you have to first run `cfn submit
--dry-run` in order to create the `build/` folder that SAM relies on.

Create a Python environment and use Python v3.7 for resource type and hook development.
Create a Python environment and use Python v3.9 for resource type and hook development.

```sh
python3.7 -m venv .env
python3.9 -m venv .env
source .env/bin/activate
```

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ first be activated using the instructions
|----|----|-------|-----------|
|[AwsCommunity::Account::AlternateContact](./resources/Account_AlternateContact)|Resource|Prod|An alternate contact attached to an Amazon Web Services account|
|[AwsCommunity::ApplicationAutoscaling::ScheduledAction](./resources/ApplicationAutoscaling_ScheduledAction)|Resource|Prod|Application Autoscaling Scheduled Action|
|[AwsCommunity::AppSync::BreakingChangeDetection](./hooks/AppSync_BreakingChangeDetection)|Hook|Prod|Detect breaking changes to appsync schemas|
|[AwsCommunity::CloudFront::LoggingEnabled](./hooks/CloudFront_LoggingEnabled)|Hook|Alpha|Validate that a CloudFront distribution has logging enabled|
|[AwsCommunity::CloudFront::S3Website::MODULE](./modules/CloudFront_S3Website/)|Module|Prod|CloudFront backed by an S3 bucket with Route53 integration|
|[AwsCommunity::DynamoDB::Item](./resources/DynamoDB_Item)|Resource|Prod|Manage the lifecycle of items in a DynamoDB table|
Expand Down
4 changes: 2 additions & 2 deletions hooks/CloudFront_LoggingEnabled/.rpdk-config
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"artifact_type": "HOOK",
"typeName": "AwsCommunity::CloudFront::LoggingEnabled",
"language": "python38",
"runtime": "python3.8",
"language": "python39",
"runtime": "python3.9",
"entrypoint": "awscommunity_cloudfront_loggingenabled.handlers.hook",
"testEntrypoint": "awscommunity_cloudfront_loggingenabled.handlers.test_entrypoint",
"settings": {
Expand Down
4 changes: 2 additions & 2 deletions hooks/CloudFront_LoggingEnabled/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ Resources:
Type: AWS::Serverless::Function
Properties:
Handler: awscommunity_cloudfront_loggingenabled.handlers.hook
Runtime: python3.7
Runtime: python3.9
CodeUri: build/

TestEntrypoint:
Type: AWS::Serverless::Function
Properties:
Handler: awscommunity_cloudfront_loggingenabled.handlers.test_entrypoint
Runtime: python3.7
Runtime: python3.9
CodeUri: build/

4 changes: 2 additions & 2 deletions hooks/CloudTrail_LogValidation/.rpdk-config
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"artifact_type": "HOOK",
"typeName": "AwsCommunity::CloudTrail::LogValidationEnabled",
"language": "python38",
"runtime": "python3.8",
"language": "python39",
"runtime": "python3.9",
"entrypoint": "awscommunity_cloudtrail_logvalidationenabled.handlers.hook",
"testEntrypoint": "awscommunity_cloudtrail_logvalidationenabled.handlers.test_entrypoint",
"settings": {
Expand Down
4 changes: 2 additions & 2 deletions hooks/CloudTrail_LogValidation/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ Resources:
Type: AWS::Serverless::Function
Properties:
Handler: awscommunity_cloudtrail_logvalidationenabled.handlers.hook
Runtime: python3.7
Runtime: python3.9
CodeUri: build/

TestEntrypoint:
Type: AWS::Serverless::Function
Properties:
Handler: awscommunity_cloudtrail_logvalidationenabled.handlers.test_entrypoint
Runtime: python3.7
Runtime: python3.9
CodeUri: build/

4 changes: 2 additions & 2 deletions hooks/EC2_SecurityGroupRestrictedSSH/.rpdk-config
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"artifact_type": "HOOK",
"typeName": "AwsCommunity::EC2::SecurityGroupRestrictedSSH",
"language": "python38",
"runtime": "python3.8",
"language": "python39",
"runtime": "python3.9",
"entrypoint": "awscommunity_ec2_securitygrouprestrictedssh.handlers.hook",
"testEntrypoint": "awscommunity_ec2_securitygrouprestrictedssh.handlers.test_entrypoint",
"settings": {
Expand Down
4 changes: 2 additions & 2 deletions hooks/EC2_SecurityGroupRestrictedSSH/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ Resources:
Type: AWS::Serverless::Function
Properties:
Handler: awscommunity_ec2_securitygrouprestrictedssh.handlers.hook
Runtime: python3.7
Runtime: python3.9
CodeUri: build/

TestEntrypoint:
Type: AWS::Serverless::Function
Properties:
Handler: awscommunity_ec2_securitygrouprestrictedssh.handlers.test_entrypoint
Runtime: python3.7
Runtime: python3.9
CodeUri: build/

2 changes: 1 addition & 1 deletion hooks/KMS_EncryptionSettings/.rpdk-config
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"artifact_type": "HOOK",
"typeName": "AwsCommunity::KMS::EncryptionSettings",
"language": "java",
"runtime": "java8",
"runtime": "java11",
"entrypoint": "com.awscommunity.kms.encryptionsettings.HookHandlerWrapper::handleRequest",
"testEntrypoint": "com.awscommunity.kms.encryptionsettings.HookHandlerWrapper::testEntrypoint",
"settings": {
Expand Down
4 changes: 2 additions & 2 deletions hooks/KMS_EncryptionSettings/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ Resources:
Type: AWS::Serverless::Function
Properties:
Handler: com.awscommunity.kms.encryptionsettings.HookHandlerWrapper::handleRequest
Runtime: java8
Runtime: java11
CodeUri: ./target/awscommunity-kms-encryptionsettings-handler-1.0-SNAPSHOT.jar

TestEntrypoint:
Type: AWS::Serverless::Function
Properties:
Handler: com.awscommunity.kms.encryptionsettings.HookHandlerWrapper::testEntrypoint
Runtime: java8
Runtime: java11
CodeUri: ./target/awscommunity-kms-encryptionsettings-handler-1.0-SNAPSHOT.jar
2 changes: 1 addition & 1 deletion hooks/S3_AccessControl/.rpdk-config
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"artifact_type": "HOOK",
"typeName": "AwsCommunity::S3::AccessControl",
"language": "java",
"runtime": "java8",
"runtime": "java11",
"entrypoint": "com.awscommunity.s3.accesscontrol.HookHandlerWrapper::handleRequest",
"testEntrypoint": "com.awscommunity.s3.accesscontrol.HookHandlerWrapper::testEntrypoint",
"settings": {
Expand Down
4 changes: 2 additions & 2 deletions hooks/S3_AccessControl/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ Resources:
Type: AWS::Serverless::Function
Properties:
Handler: com.awscommunity.s3.accesscontrol.HookHandlerWrapper::handleRequest
Runtime: java8
Runtime: java11
CodeUri: ./target/awscommunity-s3-accesscontrol-handler-1.0-SNAPSHOT.jar

TestEntrypoint:
Type: AWS::Serverless::Function
Properties:
Handler: com.awscommunity.s3.accesscontrol.HookHandlerWrapper::testEntrypoint
Runtime: java8
Runtime: java11
CodeUri: ./target/awscommunity-s3-accesscontrol-handler-1.0-SNAPSHOT.jar
4 changes: 2 additions & 2 deletions hooks/S3_BucketVersioningEnabled/.rpdk-config
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"artifact_type": "HOOK",
"typeName": "AwsCommunity::S3::BucketVersioningEnabled",
"language": "python38",
"runtime": "python3.8",
"language": "python39",
"runtime": "python3.9",
"entrypoint": "awscommunity_s3_bucketversioningenabled.handlers.hook",
"testEntrypoint": "awscommunity_s3_bucketversioningenabled.handlers.test_entrypoint",
"settings": {
Expand Down
4 changes: 2 additions & 2 deletions hooks/S3_BucketVersioningEnabled/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ Resources:
Type: AWS::Serverless::Function
Properties:
Handler: awscommunity_s3_bucketversioningenabled.handlers.hook
Runtime: python3.7
Runtime: python3.9
CodeUri: build/

TestEntrypoint:
Type: AWS::Serverless::Function
Properties:
Handler: awscommunity_s3_bucketversioningenabled.handlers.test_entrypoint
Runtime: python3.7
Runtime: python3.9
CodeUri: build/

4 changes: 2 additions & 2 deletions hooks/S3_PublicAccessControlsRestricted/.rpdk-config
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"artifact_type": "HOOK",
"typeName": "AwsCommunity::S3::PublicAccessControlsRestricted",
"language": "python38",
"runtime": "python3.8",
"language": "python39",
"runtime": "python3.9",
"entrypoint": "awscommunity_s3_publicaccesscontrolsrestricted.handlers.hook",
"testEntrypoint": "awscommunity_s3_publicaccesscontrolsrestricted.handlers.test_entrypoint",
"settings": {
Expand Down
4 changes: 2 additions & 2 deletions hooks/S3_PublicAccessControlsRestricted/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ Resources:
Type: AWS::Serverless::Function
Properties:
Handler: awscommunity_s3_publicaccesscontrolsrestricted.handlers.hook
Runtime: python3.8
Runtime: python3.9
CodeUri: build/

TestEntrypoint:
Type: AWS::Serverless::Function
Properties:
Handler: awscommunity_s3_publicaccesscontrolsrestricted.handlers.test_entrypoint
Runtime: python3.8
Runtime: python3.9
CodeUri: build/

3 changes: 1 addition & 2 deletions hooks/alpha-buildspec-java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ version: 0.2
phases:
install:
runtime-versions:
python: 3.8
java: corretto11
python: 3.9
commands:
- echo Entered the install phase...
- echo About to build $HOOK_PATH
Expand Down
2 changes: 1 addition & 1 deletion hooks/alpha-buildspec-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 0.2
phases:
install:
runtime-versions:
python: 3.8
python: 3.9
commands:
- echo Entered the install phase...
- echo About to build $HOOK_PATH
Expand Down
3 changes: 1 addition & 2 deletions hooks/beta-buildspec-java-pre-update-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ version: 0.2
phases:
install:
runtime-versions:
python: 3.8
java: corretto11
python: 3.9
commands:
- echo Entered the install phase...
- echo About to build $HOOK_PATH
Expand Down
3 changes: 1 addition & 2 deletions hooks/beta-buildspec-java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ version: 0.2
phases:
install:
runtime-versions:
python: 3.8
java: corretto11
python: 3.9
commands:
- echo Entered the install phase...
- echo About to build $HOOK_PATH
Expand Down
2 changes: 1 addition & 1 deletion hooks/beta-buildspec-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 0.2
phases:
install:
runtime-versions:
python: 3.8
python: 3.9
commands:
- echo Entered the install phase...
- echo About to build $HOOK_PATH
Expand Down
3 changes: 1 addition & 2 deletions hooks/prod-buildspec-java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ version: 0.2
phases:
install:
runtime-versions:
python: 3.8
java: corretto11
python: 3.9
commands:
- echo Entered the install phase...
- echo About to build $HOOK_PATH
Expand Down
2 changes: 1 addition & 1 deletion hooks/prod-buildspec-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 0.2
phases:
install:
runtime-versions:
python: 3.8
python: 3.9
commands:
- echo Entered the install phase...
- echo About to build $HOOK_PATH
Expand Down
2 changes: 1 addition & 1 deletion modules/alpha-buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 0.2
phases:
install:
runtime-versions:
python: 3.7
python: 3.9
commands:
- echo Entered the install phase...
- echo About to build $MODULE_PATH
Expand Down
2 changes: 1 addition & 1 deletion modules/beta-buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 0.2
phases:
install:
runtime-versions:
python: 3.7
python: 3.9
commands:
- echo Entered the install phase...
- echo About to build $MODULE_PATH
Expand Down
2 changes: 1 addition & 1 deletion modules/prod-buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 0.2
phases:
install:
runtime-versions:
python: 3.7
python: 3.9
commands:
- echo Entered the install phase...
- echo About to build $MODULE_PATH
Expand Down
4 changes: 2 additions & 2 deletions packages/cfn_guard_rs_hook/example/.rpdk-config
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"artifact_type": "HOOK",
"typeName": "Sample::S3::DefaultLockEnabled",
"language": "python37",
"runtime": "python3.7",
"language": "python39",
"runtime": "python3.9",
"entrypoint": "sample_s3_defaultlockenabled.handlers.hook",
"testEntrypoint": "sample_s3_defaultlockenabled.handlers.test_entrypoint",
"settings": {
Expand Down
4 changes: 2 additions & 2 deletions packages/cfn_guard_rs_hook/example/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ Resources:
Type: AWS::Serverless::Function
Properties:
Handler: sample_s3_defaultlockenabled.handlers.hook
Runtime: python3.7
Runtime: python3.9
CodeUri: build/

TestEntrypoint:
Type: AWS::Serverless::Function
Properties:
Handler: sample_s3_defaultlockenabled.handlers.test_entrypoint
Runtime: python3.7
Runtime: python3.9
CodeUri: build/

Loading

0 comments on commit dd6e6d4

Please sign in to comment.