What is the proper way to use tokens in conjunction with AWS lambdas?Why Does OAuth v2 Have Both Access and Refresh Tokens?facebook access token best practicebest practice to handle access token expiryAWS Lambda: How to store secret to external API?Use refresh token if auth token expired in account authenticatorHow to return HTML page stored on AWS S3 bucket from a AWS Lambda functionUpload files into s3 using AWS Lambda function (Java)How to setup a callback whenever a bearer token expires?How should I store access token from a 3rd part apiSecuring access to File in S3 Bucket using Keys/Tokens

Why, historically, did Gödel think CH was false?

Theorems that impeded progress

Mathematical cryptic clues

How to find program name(s) of an installed package?

What is the word for reserving something for yourself before others do?

Has the BBC provided arguments for saying Brexit being cancelled is unlikely?

How is the claim "I am in New York only if I am in America" the same as "If I am in New York, then I am in America?

What do the dots in this tr command do: tr .............A-Z A-ZA-Z <<< "JVPQBOV" (with 13 dots)

Is it unprofessional to ask if a job posting on GlassDoor is real?

How do I create uniquely male characters?

Why was the small council so happy for Tyrion to become the Master of Coin?

Why don't electron-positron collisions release infinite energy?

What defenses are there against being summoned by the Gate spell?

Why not use SQL instead of GraphQL?

The use of multiple foreign keys on same column in SQL Server

Accidentally leaked the solution to an assignment, what to do now? (I'm the prof)

Arthur Somervell: 1000 Exercises - Meaning of this notation

Writing rule stating superpower from different root cause is bad writing

How does strength of boric acid solution increase in presence of salicylic acid?

Why dont electromagnetic waves interact with each other?

TGV timetables / schedules?

Why do falling prices hurt debtors?

How does one intimidate enemies without having the capacity for violence?

Can I ask the recruiters in my resume to put the reason why I am rejected?



What is the proper way to use tokens in conjunction with AWS lambdas?


Why Does OAuth v2 Have Both Access and Refresh Tokens?facebook access token best practicebest practice to handle access token expiryAWS Lambda: How to store secret to external API?Use refresh token if auth token expired in account authenticatorHow to return HTML page stored on AWS S3 bucket from a AWS Lambda functionUpload files into s3 using AWS Lambda function (Java)How to setup a callback whenever a bearer token expires?How should I store access token from a 3rd part apiSecuring access to File in S3 Bucket using Keys/Tokens






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








1















My current situation is that I want to do api calls with aws lambda, and the api calls require a token. I currently store the token in an s3 bucket and just retrieve it whenever necessary, and get a new token should the one in the bucket expires. However, I was told that storing tokens in an s3 bucket isn't a good practice, but wasn't given a better alternative. The lambda takes around 30 seconds to finish running and it will most likely be called 1000+ times.
I believe the token expires after 2 hours.










share|improve this question




























    1















    My current situation is that I want to do api calls with aws lambda, and the api calls require a token. I currently store the token in an s3 bucket and just retrieve it whenever necessary, and get a new token should the one in the bucket expires. However, I was told that storing tokens in an s3 bucket isn't a good practice, but wasn't given a better alternative. The lambda takes around 30 seconds to finish running and it will most likely be called 1000+ times.
    I believe the token expires after 2 hours.










    share|improve this question
























      1












      1








      1








      My current situation is that I want to do api calls with aws lambda, and the api calls require a token. I currently store the token in an s3 bucket and just retrieve it whenever necessary, and get a new token should the one in the bucket expires. However, I was told that storing tokens in an s3 bucket isn't a good practice, but wasn't given a better alternative. The lambda takes around 30 seconds to finish running and it will most likely be called 1000+ times.
      I believe the token expires after 2 hours.










      share|improve this question














      My current situation is that I want to do api calls with aws lambda, and the api calls require a token. I currently store the token in an s3 bucket and just retrieve it whenever necessary, and get a new token should the one in the bucket expires. However, I was told that storing tokens in an s3 bucket isn't a good practice, but wasn't given a better alternative. The lambda takes around 30 seconds to finish running and it will most likely be called 1000+ times.
      I believe the token expires after 2 hours.







      amazon-s3 aws-lambda access-token






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 7 at 21:12









      TesujiTesuji

      62




      62






















          1 Answer
          1






          active

          oldest

          votes


















          0














          I don't see anything wrong with storing tokens in S3. Just make sure the permissions are set correctly.



          Some may prefer storing tokens in a database, but that may be overkill if you just want to store a token.



          As an example, another AWS product is CloudFormation. CloudFormation templates are text files that describe how to create AWS resources. They're bigger than tokens, but they're still lighter than images or video. In the CloudFormation documentation, they suggest storing those templates on S3.



          Also, S3 charges for data storage and I/O (pricing), which is perfect for small data like tokens.






          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55052876%2fwhat-is-the-proper-way-to-use-tokens-in-conjunction-with-aws-lambdas%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            I don't see anything wrong with storing tokens in S3. Just make sure the permissions are set correctly.



            Some may prefer storing tokens in a database, but that may be overkill if you just want to store a token.



            As an example, another AWS product is CloudFormation. CloudFormation templates are text files that describe how to create AWS resources. They're bigger than tokens, but they're still lighter than images or video. In the CloudFormation documentation, they suggest storing those templates on S3.



            Also, S3 charges for data storage and I/O (pricing), which is perfect for small data like tokens.






            share|improve this answer



























              0














              I don't see anything wrong with storing tokens in S3. Just make sure the permissions are set correctly.



              Some may prefer storing tokens in a database, but that may be overkill if you just want to store a token.



              As an example, another AWS product is CloudFormation. CloudFormation templates are text files that describe how to create AWS resources. They're bigger than tokens, but they're still lighter than images or video. In the CloudFormation documentation, they suggest storing those templates on S3.



              Also, S3 charges for data storage and I/O (pricing), which is perfect for small data like tokens.






              share|improve this answer

























                0












                0








                0







                I don't see anything wrong with storing tokens in S3. Just make sure the permissions are set correctly.



                Some may prefer storing tokens in a database, but that may be overkill if you just want to store a token.



                As an example, another AWS product is CloudFormation. CloudFormation templates are text files that describe how to create AWS resources. They're bigger than tokens, but they're still lighter than images or video. In the CloudFormation documentation, they suggest storing those templates on S3.



                Also, S3 charges for data storage and I/O (pricing), which is perfect for small data like tokens.






                share|improve this answer













                I don't see anything wrong with storing tokens in S3. Just make sure the permissions are set correctly.



                Some may prefer storing tokens in a database, but that may be overkill if you just want to store a token.



                As an example, another AWS product is CloudFormation. CloudFormation templates are text files that describe how to create AWS resources. They're bigger than tokens, but they're still lighter than images or video. In the CloudFormation documentation, they suggest storing those templates on S3.



                Also, S3 charges for data storage and I/O (pricing), which is perfect for small data like tokens.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 8 at 3:50









                pybpyb

                2,22311526




                2,22311526





























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55052876%2fwhat-is-the-proper-way-to-use-tokens-in-conjunction-with-aws-lambdas%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Save data to MySQL database using ExtJS and PHP [closed]2019 Community Moderator ElectionHow can I prevent SQL injection in PHP?Which MySQL data type to use for storing boolean valuesPHP: Delete an element from an arrayHow do I connect to a MySQL Database in Python?Should I use the datetime or timestamp data type in MySQL?How to get a list of MySQL user accountsHow Do You Parse and Process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?

                    Compiling GNU Global with universal-ctags support Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Tags for Emacs: Relationship between etags, ebrowse, cscope, GNU Global and exuberant ctagsVim and Ctags tips and trickscscope or ctags why choose one over the other?scons and ctagsctags cannot open option file “.ctags”Adding tag scopes in universal-ctagsShould I use Universal-ctags?Universal ctags on WindowsHow do I install GNU Global with universal ctags support using Homebrew?Universal ctags with emacsHow to highlight ctags generated by Universal Ctags in Vim?

                    Add ONERROR event to image from jsp tldHow to add an image to a JPanel?Saving image from PHP URLHTML img scalingCheck if an image is loaded (no errors) with jQueryHow to force an <img> to take up width, even if the image is not loadedHow do I populate hidden form field with a value set in Spring ControllerStyling Raw elements Generated from JSP tagds with Jquery MobileLimit resizing of images with explicitly set width and height attributeserror TLD use in a jsp fileJsp tld files cannot be resolved