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

install issues #1

Open
hounded opened this issue Nov 15, 2018 · 6 comments
Open

install issues #1

hounded opened this issue Nov 15, 2018 · 6 comments

Comments

@hounded
Copy link

hounded commented Nov 15, 2018

Hi trying to install couple of issues

running launch stack can't access your bucket

Template validation error: S3 error: Access Denied For more information check http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html

running make file
make deploy SAM_S3_BUCKET=mybucket AWS_DEFAULT_REGION=ap-southeast-2

Makefile:81: *** SAM_S3_BUCKET variable is not set. Set it as environment variable or as command line argument.. Stop.

@mrtj
Copy link
Collaborator

mrtj commented Nov 16, 2018

Hello, did you try to set the bucket name to something unique? S3 bucket names should be globally unique. mybucket is just an example and most probably somebody already registered a bucket with this name, and you don't have access to that existing bucket. The standard way to find a unique bucket name is to use the DNS format, i.e. mybucket.mycompany.com, for example in our case I use sam-templates.neosperience.com as bucket name. Let me know if this helps.

Also, the AWS account you use with the AWS CLI should have a role that allows you to create new buckets and put objects in it.

@hounded
Copy link
Author

hounded commented Nov 16, 2018

Hi Cheers for answering, yeah I got that, created the bucket, bucket exists. Sorry I just used mybucket as in the example.

Yeah got all the permissions on the account. It just doesn't run, I have switched to greengo until I can get this to work

@mrtj
Copy link
Collaborator

mrtj commented Nov 17, 2018

Did you try the one click install i.e. just clicking on the “Launch stack” button? That way you don’t even have to use the Makefile.

The other thing you can try is to set the bucket name as an environment variable:

$ export SAM_S3_BUCKET=mybucket.mycompany.com
$ export AWS_DEFAULT_REGION=ap-southeast-2
$ make deploy

@hounded
Copy link
Author

hounded commented Nov 19, 2018

running launch stack can't access your bucket

Yeah I did try that also, I have another question for you as you are up to speed with ggc

https://forums.aws.amazon.com/message.jspa?messageID=877737#877737

@mrtj
Copy link
Collaborator

mrtj commented Nov 19, 2018

Thank your feedback, I opened another issue for the "access denied" error when using the "Launch stack" button: #2 that is now fixed.

@Sandmania
Copy link

Sandmania commented Dec 27, 2018

There seems to be some other problems with the Makefile, too. It now crashes with make: *** No rule to make target `Pipfile', needed by `dist/Pipenv'. Stop. when running make deploy AWS_DEFAULT_REGION=eu-west-1 SAM_S3_BUCKET=tp-vlk-grssfrmt for example.

I'm no expert when it comes to make, but I think it has something to do with the recent changes where among other things the Pipfile was removed. Adding .PHONY: Pipfile on line 46 gets us a bit further, but it also seems that any commands that would create the Pipfile have been removed here 146c23f#diff-b67911656ef5d18c4ae36cb6741b7965
So now _package fails with

[*] Creating dist folder
mkdir -p dist
[+] Launching docker to install python requirements...
docker run -v $PWD:/var/task \
		-it lambci/lambda:build-python3.6 /bin/bash \
		-c 'make _package SAM_S3_BUCKET=tp-vlk-grssfrmt AWS_DEFAULT_REGION=eu-west-1'
[*] Cleaning eventual cache files
find dist -name '*~' -exec rm -f {} +
find dist -name '__pycache__' -exec rm -rf {} +
rm -f requirements.txt
cp Pipfile dist/Pipenv
cp: cannot stat ‘Pipfile’: No such file or directory
make: *** [_package] Error 1
make: *** [dist/Pipenv] Error 2

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

3 participants