aws-cloudformation / aws-cloudformation-resource-providers-logs

The CloudFormation Resource Provider Package For Amazon CloudWatch Logs
https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/WhatIsCloudWatchLogs.html
Apache License 2.0
33 stars 35 forks source link

Use the same SDK version as java plugin #29

Closed wbingli closed 4 years ago

wbingli commented 4 years ago

Issue #, if available: #28

Description of changes:. Java plugin uses version 2.10.49 but this one is 2.10.19. And different version cause unexpected error while making SDK calls.

Also update the sam local test template after change the package nam.

Testing

❯ sam local invoke TestEntrypoint --event sam-tests/delete.json
Invoking software.amazon.logs.loggroup.HandlerWrapper::testEntrypoint (java8)
Decompressing aws-cloudformation/aws-cloudformation-resource-providers-logs/aws-logs-loggroup/target/aws-logs-loggroup-handler-1.0-SNAPSHOT.jar

Fetching lambci/lambda:java8 Docker container image......
Mounting /private/var/folders/cm/dg8dxtl148b_3hzj6g3tj099kjnx1q/T/tmp111la1qk as /var/task:ro,delegated inside runtime container
START RequestId: b91df09e-938a-10f0-af8b-3e1d234c7603 Version: $LATEST
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[DELETE] invoking handler...Failed to execute remote function: {The specified log group does not exist. (Service: CloudWatchLogs, Status Code: 400, Request ID: 64fe5c7f-1069-4276-8d29-dea9dd01083f)}END RequestId: b91df09e-938a-10f0-af8b-3e1d234c7603
REPORT RequestId: b91df09e-938a-10f0-af8b-3e1d234c7603  Init Duration: 5766.49 ms       Duration: 5808.46 ms    Billed Duration: 5900 ms        Memory Size: 128 MB       Max Memory Used: 88 MB

{"status":"FAILED","errorCode":"NotFound","message":"Resource of type 'AWS::Logs::LogGroup' with identifier '{\"/properties/LogGroupName\":\"test-loggroup\"}' was not found.","callbackDelaySeconds":0}

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.