0

I need to store a variable containing a URL across invocations of my function, and to be able to modify this variable from inside the function. So in short I need to be able to send this URL to the function, and be able to retrieve it later. I've created a bucket I could store the URL in, but I'm having a real hard time understanding the documentation on how to write to and read from the bucket using lambda. Using the bucket or some other method, how would I store this piece of data? I'm using python.

1 Answer 1

1

There are several ways, which depend on exactly how the URL is shared, accessed, how often you read/write it.

For infrequent access, e.g., you lambda executes once a minute, you can store it in AWS Systems Manager Parameter Store.

For high frequencies and concurrent access, probably you should consider using DynamoDB.

S3 can also be used, but it will be the slowest and requires a bit of setup to read and write from your lambda. Access to parameter store is rather simple, as you can use get_parameter boto3 sdk.

Sign up to request clarification or add additional context in comments.

1 Comment

The parameter store worked quite well and was far easier to understand, thank you.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.