Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lambda seems to fail writting back to the pre-signed URL with a permissions error. #20

Open
stjbrown opened this issue Jul 23, 2019 · 0 comments

Comments

@stjbrown
Copy link

I have really simple lambda that I am using to test this, most of which from the repo. When I call this with the simple CFT I get the following error.

[ERROR] 2019-07-23T23:18:38.572Z 53eb4c5b-fc49-4154-952e-a7f7b75bc1fe An error occurred (AccessDeniedException) when calling the PutRule operation:

Lambda
`from crhelper import CfnResource
import logging

#Intiate Logger
logger = logging.getLogger(name)

Initialise the helper, all inputs are optional, this example shows the defaults

helper = CfnResource(json_logging=False, log_level='DEBUG', boto_level='DEBUG')

#Define Netskope Vars
try:
myData= "123456789"
pass
except Exception as e:
helper.init_failure(e)

@helper.create
def create(event, context):
logger.info("Got Create")

helper.Data.update({"myData": myData})
return True

@helper.delete
def delete(event, context):
logger.info("Got Delete")
# Delete never returns anything. Should not fail if the underlying resources are already deleted. Desired state.

@helper.poll_create
def poll_create(event, context):
logger.info("Got create poll")
# Return a resource id or True to indicate that creation is complete. if True is returned an id will be generated
return True

def lambda_handler(event, context):
helper(event, context)`

CFT
--- AWSTemplateFormatVersion: '2010-09-09' Parameters: {} Resources: MyCustom: Type: Custom::Test Properties: ServiceToken: arn:aws:lambda:...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant