Deployment/Installation Guide
INC00381 opened this issue · 18 comments
Hi,
Is there a guide or step by step how to instruction to deploy this in aws? If not may i suggest to put few lines as in how to get this up and working in aws.
Ok Since I read something about lambda by now I understood few things, I am listing it here so that it might help, someone like me.
Install aws CLI
- Check if the python is already installed by using
$ python --version
- Download CLI by
$ curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
- UnZip CLI by
$ unzip awscli-bundle.zip
- Install CLI by
$ sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
- check if the CLI is installed correctly by
$ aws --version
Configure CLI
- Configure CLI with
$ aws configure
- Put the AWS Access Key ID when asked
- Put the AWS Secret Access Key when asked
- Put Default region name when asked
- Put Default output format, press enter to keep the default which is JSON
Install jq
- Install jq on mac by
brew install jq
More details of installing aws CLI can be found here, more details on installing jq can be found here.
Roles
Your user configured in CLI should have below policies at-least to execute init.sh
- AWSLambdaDynamoDBExecutionRole
- AmazonCognitoDeveloperAuthenticatedIdentities
- AWSLambdaExecute
- AWSLambdaInvocation-DynamoDB
The email address in config.json must be verified in aws SES so that you can send verification mails else the user sign up/creation fails.
Once done you should be able to use the instruction as provided in READ ME. Last but not least the config.json details must be 100% correct.
BR
Thanks for making it clearer !
Btw does the app have to be deployed to us-east-1 and not us-west-2
App Can be deployed to any valid region. Yes it can be deployed to us-west-2
@INC00381 while trying to execute init.sh I am getting following error "The config profile (null) could not be found" seems to me like it is not able to get the configured profile, however, I do have all the AWS CLI configurations done and included proper parameters in config.json . Am I still missing something?
Your config.json file should have an entry like this: "CLI_PROFILE": "aws". Also to sanity check run the following CLI command: aws configure list --profile [your profile name] to verify you have the profile configured correctly.
Yup, I had the same issue. You have to do: export AWS_DEFAULT_PROFILE=user2
first to set the profile the init.sh to use
Oh ya! That too @russellday
Thanks @russellday @iSkore , apparently the profile name was not set. No a different note, still cannot get past init.sh, the roles are not getting created. Is it just me or the AWS IAM servers are acting up today?
@hshah8831 - I have been noticing a few things going on in the last two weeks. A few pages that said "No resources found" or something. Can you post a StackOverflow question and link it in this? I'll get that answered for you with the files I used so you can get this operational. Others in this chat can use it too that way.
@hshah8831 - Yes there is an IAM related issue right now :( http://status.aws.amazon.com/
@russellday IAM is coming around now. @iSkore I have been able to get it running for now. Let me get into deeper trouble, which I am sure of, and then put a question in Stackoverflow. Thanks
No matter what I do, I am always getting botocore.exceptions.ProfileNotFound: The config profile (admin) could not be found. while running init.sh
I tried all steps mentioned above. Please respond soon. I am middle of a project and I need it urgently.
@Shivam1401
I was facing the almost same thing few days back, init.sh was not picking the cli profile. heres what I did-:
add following in the config.json: "CLI_PROFILE": "default" or anyother profile name you have in your aws config file.
If you are not sure if the profile name exists or not try this aws configure list --profile default.
Or if you just comment out those lines in init.sh and deploy.sh (if you know you only have 1 profile), that works too.
@hshah8831 : Thanks for reply but I have tried that already. It did not work in my case.
@patchu : Thanks. It works like a charm.
@patchu / @hshah8831 I am new to this AWS thing. I have followed the all steps mentioned above. now I can see that entries has been created in lamda and Dynamo Table. but I am not able to run any of the functionality. When I am running through S3 url of signup, Nothing is happening and no record being inserted.
Can you guys help me here. What I may be missing?
1+
@Shivam1401 Can you paste the Lambda logs here so we can see what is failing?
@patchu I got it working. Email was not being sent due to AWS SES sandbox env.