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

sls package shouldn't try to deploy anything #46

Open
Killian168 opened this issue Jan 30, 2023 · 3 comments
Open

sls package shouldn't try to deploy anything #46

Killian168 opened this issue Jan 30, 2023 · 3 comments

Comments

@Killian168
Copy link
Contributor

When using the plugin I tried doing a simple sls package to test out how my application would package. The serverless-glue plugin tried to create a bucket during that process which stopped the command since it didn't have active credentials.

I'm not sure but the creation of a bucket and the deployment of the python job files feel like something that should only be done in a sls deploy command?

FYI in the Serverless Framework docs it mentions that packaging shouldn't deploy anything to AWS:
Using the Serverless CLI tool, you can package your project without deploying it to AWS.

Happy to contribute just wanted to see what people think before putting effort into it. Thanks.

@toryas
Copy link
Owner

toryas commented Feb 6, 2023

yes that it's an issue because the upload files using aws-sdk. you can skip the uploads set SLSGLUE_SKIP_UPLOADS env in true, I don't remember if this skip the bucket creation too

@OlafHeudecker
Copy link

I encountered this issue, too. At time of packaging, we didn't expect to need AWS credentials ...
And as you mention: Indications are that the package process already checks whether the (tmp) Bucket exists:

===
Packaging for stage dev (eu-central-1)
[Serverless-Glue]: Glue config detected.
[Serverless-Glue]: Processing Jobs.
[Serverless-Glue]: Bucket don't exist, I try to create it.
Environment: linux, node 14.21.2, framework 3.27.0, plugin 6.2.3, SDK 4.3.2
Docs: docs.serverless.com
Support: forum.serverless.com
Bugs: github.com/serverless/serverless/issues

Error:
CredentialsError: Missing credentials in config, if using AWS_CONFIG_FILE, set AWS_SDK_LOAD_CONFIG=1

@mrobinson1022
Copy link
Contributor

That env var SLSGLUE_SKIP_UPLOADS definitely works, but the logging does not indicate upload has been skipped.

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

4 participants